<!--#begin displayProjectList -->
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
	<tr> 
		<td align="center" valign="middle" class="BabLoginCadreBackground"> 
			<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
				<tr class="BabSiteAdminTitleFontBackground"> 
					<td width="20%">{ m_captions[name] }</td>
					<td width="40%">{ m_captions[description] }</td>
					<td width="40%" align="center">&nbsp;</td>
				</tr>
				<!--#in nextItem -->
				
			<!--#if m_is_altbg -->
				<tr class="BabSiteAdminFontBackground"> 
			<!--#else m_is_altbg -->
				<tr class="BabForumBackground1">
			<!--#endif m_is_altbg -->
	
				<!--#if m_datas[isLink] -->
					<td><a href="{ m_datas[url] }{ m_datas[id] }">{ m_datas[name] }</a></td>
				<!--#else m_datas[isLink] -->
					<td>{ m_datas[name] }</td>
				<!--#endif m_datas[isLink] -->

					<td>{ m_datas[description] }</td>
					<td>
						<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
						<!--#if m_datas[bIsRightUrl] -->
							<tr>
								<td>
									<a href="{ m_datas[rightsUrl] }" title="{ m_captions[rights] }">
										{ m_captions[rights] }
									</a>
								</td>
							</tr>
						<!--#endif m_datas[bIsRightUrl] -->
						<!--#if m_datas[bIsManager] -->
							<tr>
								<td>
									<a href="{ m_datas[configurationUrl] }" title="{ m_captions[configuration] }">
										{ m_captions[configuration] }
									</a>
								</td>
							</tr>
							<tr>
								<td>
									<a href="{ m_datas[specificFieldUrl] }" title="{ m_captions[spfFld] }">
										{ m_captions[spfFld] }
									</a>
								</td>
							</tr>
							<tr>
								<td>
									<a href="{ m_datas[categoryUrl] }" title="{ m_captions[category] }">
										{ m_captions[category] }
									</a>
								</td>
							</tr>
							<tr>
								<td>
									<a href="{ m_datas[commentaryUrl] }" title="{ m_captions[commentary] }">
										{ m_captions[commentary] }
									</a>
								</td>
							</tr>
							<tr>
								<td>
									<a href="{ m_datas[noticeUrl] }" title="{ m_captions[notice] }">
										{ m_captions[notice] }
									</a>
								</td>
							</tr>
						<!--#endif m_datas[bIsManager] -->
							<tr>
								<td>
									<a href="{ m_datas[taskUrl] }" title="{ m_captions[task] }">
										{ m_captions[task] }
									</a>
								</td>
							</tr>
							<tbody><tr><td></td></tr></tbody>
						</table>
					</td>
				</tr>
				<!--#endin nextItem -->
			</table>
		</td>
	</tr>
</table>
<!--#end displayProjectList -->

<!--#begin commentariesList -->
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
	<tr> 
		<td align="center" valign="middle" class="BabLoginCadreBackground"> 
			<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
				<tr class="BabSiteAdminTitleFontBackground"> 
					<td width="50%">{ m_captions[commentary] }</td>
					<td width="20%">{ m_captions[date] }</td>
					<td width="30%" align="center">&nbsp;</td>
				</tr>
				<!--#in nextCommentary -->
				
			<!--#if m_is_altbg -->
				<tr class="BabSiteAdminFontBackground"> 
			<!--#else m_is_altbg -->
				<tr class="BabForumBackground1">
			<!--#endif m_is_altbg -->
	
				<!--#if m_datas[isLink] -->
					<td><a href="{ m_datas[url] }{ m_datas[id] }">{ m_datas[commentary] }</a></td>
				<!--#else m_datas[isLink] -->
					<td>{ m_datas[commentary] }</td>
				<!--#endif m_datas[isLink] -->
					<td>{ m_datas[created] }</td>
					<td>
						<table border="0" cellspacing="0" cellpadding="2" align="center">
							<!--#in getNextAnchor -->
							<tr>
								<td class="{ m_datas[className] }">
									<a href="{ m_anchorItem[href] }" title="{ m_anchorItem[title] }">
										{ m_anchorItem[title] }
									</a>
								</td>
							</tr>
							<!--#endin getNextAnchor -->
							<tbody><tr><td></td></tr></tbody>
						</table>
					</td>
				</tr>
				<!--#endin nextCommentary -->
			</table>
		</td>
	</tr>
</table>
<!--#end commentariesList -->

<!--#begin close_popup -->

<script type="text/javascript">
<!--
	if(window.opener != null)
	{
		if(typeof opener.onMenuSelected != 'undefined')
		{
			opener.onMenuSelected('oLiCommentaries');
			opener.location.href = opener.location.href + '&selectedMenu=' + 'oLiCommentaries';
		}
		window.close();
	}
//-->
</script>
	
<!--#end close_popup -->

<!--#begin displayCommentary -->
<script type="text/javascript" language="JavaScript1.5">
<!--
function on_btn_clicked(idx, action)
{
	var form = document.forms.displayCommentary;

	form.idx.value = idx;
	form.action.value = action;
}

function submit_form()
{
	return true;
}
//-->
</script>
<style type="text/css">
	@import url('{ babInstallPath }/styles/taskManager.css');
</style>
<form name ="displayCommentary" method="post" action="{ babPhpSelf }" onsubmit="return(submit_form())">
	<input type="hidden" name="tg" value="{ m_datas[tg] }" />
	<input type="hidden" name="idx" value="" />
	<input type="hidden" name="action" value="" />
	<input type="hidden" name="iIdProjectSpace" value="{ m_datas[iIdProjectSpace] }" />
	<input type="hidden" name="iIdProject" value="{ m_datas[iIdProject] }" />
	<input type="hidden" name="iIdTask" value="{ m_datas[iIdTask] }" />
	<input type="hidden" name="iIdCommentary" value="{ m_datas[iIdCommentary] }" />
	<input type="hidden" name="isPopUp" value="{ m_datas[isPopUp] }" />

	<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground"> 
				<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
					<tr> 
						<td align="center"><textarea id="commentary" name="sCommentary" cols="20" rows="20">{ m_datas[commentary] }</textarea></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
<br />
<div align="center">
<!--#if m_datas[iIdCommentary] "== 0" -->
	<input type="submit" value="{ m_captions[add] }" onclick="on_btn_clicked('{ m_datas[addIdx] }', '{ m_datas[addAction] }')" />
<!--#else m_datas[iIdCommentary] -->
	<input type="submit" value="{ m_captions[modify] }" onclick="on_btn_clicked('{ m_datas[modifyIdx] }', '{ m_datas[modifyAction] }')" />
	<input type="submit" value="{ m_captions[delete] }" onclick="on_btn_clicked('{ m_datas[delIdx] }', '{ m_datas[delAction] }')" />
<!--#endif m_datas[iIdCommentary] -->
</div>
</form>
<!--#end displayCommentary -->


<!--#begin projectForm -->
<script type="text/javascript">
<!--
function on_btn_clicked(idx, action)
{
	var form = document.forms.projectForm;

	form.idx.value = idx;
	form.action.value = action;
}

function submit_form()
{
	return true;
}
//-->
</script>

<form name="projectForm" method="post" action="{ babPhpSelf }" onsubmit="return(submit_form())">
	<input type="hidden" name="tg" value="{ m_datas[tg] }" />
	<input type="hidden" name="idx" value="" />
	<input type="hidden" name="action" value="" />
	<input type="hidden" name="iIdProjectSpace" value="{ m_datas[iIdProjectSpace] }" />
	<input type="hidden" name="iIdProject" value="{ m_datas[iIdProject] }" />

	<table width="85%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground">
				<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" class="BabLoginMenuBackground">
					<tr> 
						<td>
							{ m_captions[sName] }
						</td>
						<td>
							<input type="text" name="sName" size="25" maxlength="255" value="{ m_datas[sName] }" />
						</td>
					</tr>

					<tr> 
						<td>
							{ m_captions[sDescription] }
						</td>
						<td>
							<textarea name="sDescription" cols="50" rows="10">{ m_datas[sDescription] }</textarea>
						</td>
					</tr>

					<tr> 
						<td colspan="2">
							<br />
						</td>
					</tr>

					<tr>
						<td colspan="2" align="center">
						<!--#if m_datas[iIdProject] "== 0" -->
							<input type="submit" value="{ m_captions[add] }" onclick="on_btn_clicked('{ m_datas[add_idx] }', '{ m_datas[add_action] }')" />
						<!--#else m_datas[iIdProject] -->
							<input type="submit" value="{ m_captions[modify] }" onclick="on_btn_clicked('{ m_datas[modify_idx] }', '{ m_datas[modify_action] }')" />
							<!--#if m_datas[bIsDeletable] -->
								<input type="submit" value="{ m_captions[delete] }" onclick="on_btn_clicked('{ m_datas[delete_idx] }', '{ m_datas[delete_action] }')" />
							<!--#endif m_datas[bIsDeletable] -->
						<!--#endif m_datas[iIdProject] -->

						</td>
					</tr>

					<tr> 
						<td colspan="2">
							<br />
						</td>
					</tr>

				</table>
			</td>
		</tr>
	</table>
</form>
<!--#end projectForm -->

<!--#begin taskList -->
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
	<tr> 
		<td align="center" valign="middle" class="BabLoginCadreBackground"> 
			<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
				<tr class="BabSiteAdminTitleFontBackground"> 
					<td width="10%">{ m_captions[taskNumber] }</td>
					<td width="50%">{ m_captions[description] }</td>
					<td width="10%">{ m_captions[date] }</td>
					<td width="30%" align="center">&nbsp;</td>
				</tr>
				<!--#in nextTask -->
				
			<!--#if m_is_altbg -->
				<tr class="BabSiteAdminFontBackground"> 
			<!--#else m_is_altbg -->
				<tr class="BabForumBackground1">
			<!--#endif m_is_altbg -->
	
				<!--#if m_datas[isLink] -->
					<td><a href="{ m_datas[url] }{ m_datas[id] }">{ m_datas[taskNumber] }</a></td>
				<!--#else m_datas[isLink] -->
					<td>{ m_datas[taskNumber] }</td>
				<!--#endif m_datas[isLink] -->
					<td>{ m_datas[description] }</td>
					<td>{ m_datas[created] }</td>
					<td>
						<table border="0" cellspacing="0" cellpadding="2" align="center">
							<!--#in getNextAnchor -->
							<tr>
								<td class="{ m_datas[className] }">
									<a href="{ m_anchorItem[href] }" title="{ m_anchorItem[title] }">
										{ m_anchorItem[title] }
									</a>
								</td>
							</tr>
							<!--#endin getNextAnchor -->
							<tbody><tr><td></td></tr></tbody>
						</table>
					</td>
				</tr>
				<!--#endin nextTask -->
			</table>
		</td>
	</tr>
</table>
<!--#end taskList -->

<!--#begin taskForm -->
<script type="text/javascript">
<!--

var g_sPlannedEndDate = '{ m_captions[sPlannedEndDate] }';
var g_sDeadline = '{ m_captions[sDeadline] }';


function on_btn_clicked(idx, action)
{
	var form = document.forms.taskForm;

	form.idx.value = idx;
	form.action.value = action;
}

function submit_form()
{
//	var oShortDescription = document.getElementById("sShortDescription");
//	oShortDescription.disabled = false;
	
	var oTrProposable = document.getElementById("oTrProposable");
	if(null != oTrProposable)
	{
		oTrProposable.style.display = '';
	}
	return true;
}

function onMenuSelected(oSelectedLi)
{
	var form = document.forms.taskForm;
	
	form.selectedMenu.value = oSelectedLi.id;
	
	var oLiGeneral = document.getElementById("oLiGeneral");
	var oLiPredecessors = document.getElementById("oLiPredecessors");
	var oLiResources = document.getElementById("oLiResources");
	var oLiCommentaries = document.getElementById("oLiCommentaries");
	var oLiSpfFld = document.getElementById("oLiSpfFld");
	var oLiCost = document.getElementById("oLiCost");
	
	var oDivGeneral = document.getElementById("sGeneral");
	var oDivSpfFld = document.getElementById("sSpfFld");
	var oDivCommentaries = document.getElementById("sCommentaries");
	var oDivResources = document.getElementById("sResources");
	var oDivPredecessor = document.getElementById("sPredecessor");
	var oDivCost = document.getElementById("sCost");
	
	switch(oSelectedLi.id)
	{
		case 'oLiGeneral':
		{
			if(null != oLiGeneral) oLiGeneral.firstChild.className = 'current';
			if(null != oLiPredecessors) oLiPredecessors.firstChild.className = '';
			if(null != oLiResources) oLiResources.firstChild.className = '';
			if(null != oLiCommentaries) oLiCommentaries.firstChild.className = '';
			if(null != oLiSpfFld) oLiSpfFld.firstChild.className = '';
			if(null != oLiCost) oLiCost.firstChild.className = '';
			
			showHideElement('sGeneral', g_tskMgrShow);
			showHideElement('sSpfFld', g_tskMgrHide);
			showHideElement('sCommentaries', g_tskMgrHide);
			showHideElement('sResources', g_tskMgrHide);
			showHideElement('sPredecessor', g_tskMgrHide);
			showHideElement('sCost', g_tskMgrHide);
		}
		break;
		
		case 'oLiPredecessors':
		{
			if(null != oLiGeneral) oLiGeneral.firstChild.className = '';
			if(null != oLiPredecessors) oLiPredecessors.firstChild.className = 'current';
			if(null != oLiResources) oLiResources.firstChild.className = '';
			if(null != oLiCommentaries) oLiCommentaries.firstChild.className = '';
			if(null != oLiSpfFld) oLiSpfFld.firstChild.className = '';
			if(null != oLiCost) oLiCost.firstChild.className = '';

			showHideElement('sGeneral', g_tskMgrHide);
			showHideElement('sSpfFld', g_tskMgrHide);
			showHideElement('sCommentaries', g_tskMgrHide);
			showHideElement('sResources', g_tskMgrHide);
			showHideElement('sPredecessor', g_tskMgrShow);
			showHideElement('sCost', g_tskMgrHide);
		}
		break;
		
		case 'oLiCost':
		{
			if(null != oLiGeneral) oLiGeneral.firstChild.className = '';
			if(null != oLiPredecessors) oLiPredecessors.firstChild.className = '';
			if(null != oLiResources) oLiResources.firstChild.className = '';
			if(null != oLiCommentaries) oLiCommentaries.firstChild.className = '';
			if(null != oLiSpfFld) oLiSpfFld.firstChild.className = '';
			if(null != oLiCost) oLiCost.firstChild.className = 'current';
			
			showHideElement('sGeneral', g_tskMgrHide);
			showHideElement('sSpfFld', g_tskMgrHide);
			showHideElement('sCommentaries', g_tskMgrHide);
			showHideElement('sResources', g_tskMgrHide);
			showHideElement('sPredecessor', g_tskMgrHide);
			showHideElement('sCost', g_tskMgrShow);
		}
		break;
		
		case 'oLiCommentaries':
		{
			if(null != oLiGeneral) oLiGeneral.firstChild.className = '';
			if(null != oLiPredecessors) oLiPredecessors.firstChild.className = '';
			if(null != oLiResources) oLiResources.firstChild.className = '';
			if(null != oLiCommentaries) oLiCommentaries.firstChild.className = 'current';
			if(null != oLiSpfFld) oLiSpfFld.firstChild.className = '';
			if(null != oLiCost) oLiCost.firstChild.className = '';
			
			showHideElement('sGeneral', g_tskMgrHide);
			showHideElement('sSpfFld', g_tskMgrHide);
			showHideElement('sCommentaries', g_tskMgrShow);
			showHideElement('sResources', g_tskMgrHide);
			showHideElement('sPredecessor', g_tskMgrHide);
			showHideElement('sCost', g_tskMgrHide);
		}
		break;
		
		case 'oLiSpfFld':
		{
			if(null != oLiGeneral) oLiGeneral.firstChild.className = '';
			if(null != oLiPredecessors) oLiPredecessors.firstChild.className = '';
			if(null != oLiResources) oLiResources.firstChild.className = '';
			if(null != oLiCommentaries) oLiCommentaries.firstChild.className = '';
			if(null != oLiSpfFld) oLiSpfFld.firstChild.className = 'current';
			if(null != oLiCost) oLiCost.firstChild.className = '';
			
			showHideElement('sGeneral', g_tskMgrHide);
			showHideElement('sSpfFld', g_tskMgrShow);
			showHideElement('sCommentaries', g_tskMgrHide);
			showHideElement('sResources', g_tskMgrHide);
			showHideElement('sPredecessor', g_tskMgrHide);
			showHideElement('sCost', g_tskMgrHide);
		}
		break;
	}
}

function setDateValue(aDate)
{
	var form = document.forms.taskForm;
	form[form.selectedDateFieldName.value].value =  aDate['day'] + '-' + aDate['month'] + '-' + aDate['year'];
}

function dateCallback(sFieldName)
{
	var form = document.forms.taskForm;
	form.selectedDateFieldName.value = sFieldName;
	bab_dialog.selectdate(setDateValue);
}


function setPlannedEndDateCaption()
{
	//{}
	var TASK		= { m_datas[iClassTask] };
	var CHECKPOINT	= { m_datas[iClassCheckPoint] };
	var TODO		= { m_datas[iClassToDo] };
	var DURATION	= { m_datas[iDateTypeDuration] };
	var DATE		= { m_datas[iDateTypeDate] };

	var oPlannedEndDate 	= document.getElementById('sPlannedEndDateCaption');
	var oSelectClass		= document.getElementById('iClass');
	var oSelectDurationType = document.getElementById('oDurationType');
	
	if(null != oPlannedEndDate && null != oSelectClass && null != oSelectDurationType)
	{
		var iDurationType = parseInt(oSelectDurationType.options[oSelectDurationType.selectedIndex].value);
		var iType = parseInt(oSelectClass.options[oSelectClass.selectedIndex].value);
		
		
		if(DURATION == iDurationType && TASK == iType)
		{
			oPlannedEndDate.innerHTML = g_sDeadline;
		}
		else
		{
			oPlannedEndDate.innerHTML = g_sPlannedEndDate;
		}
	}
}


function onClassChanged(oSelect)
{
	//{}
	var TASK = { m_datas[iClassTask] };
	var CHECKPOINT = { m_datas[iClassCheckPoint] };
	var TODO = { m_datas[iClassToDo] };
	
	var iType = parseInt(oSelect.options[oSelect.selectedIndex].value);

	
	switch(iType)
	{
		case TASK:
		{
			var oTrDurationType = document.getElementById("oTrDurationType");
			if(null != oTrDurationType)
			{
				oTrDurationType.style.display = '';
				
				showHideElement('oTrLinkedTask', g_tskMgrShow);

				var oDurationType = document.getElementById("oDurationType");
				if(null != oDurationType) onDurationTypeChanged(oDurationType);

				var oLinkedTask = document.getElementById("oLinkedTask");
				if(null != oLinkedTask) onLinkTaskChanged(oLinkedTask);
				
				showHideElement('oLiResources', g_tskMgrShow);
				
				showHideElement('oTrProposable', g_tskMgrShow);
				showHideElement('oTrCompletion', g_tskMgrShow);
				showHideElement('oTrAnswerEnable', g_tskMgrShow);
				showHideElement('oTrTaskResponsible', g_tskMgrShow);
				
				processStartDate();
			}
		}
		break;
		
		case CHECKPOINT:
		{
			showHideElement('oTrLinkedTask', g_tskMgrHide);
			showHideElement('oTrDurationType', g_tskMgrHide);
			showHideElement('oTrDuration', g_tskMgrHide);
			
			showHideElement('oTrStartDate', g_tskMgrHide);
			showHideElement('oTrEndDate', g_tskMgrShow);
			showHideElement('oTrPlannedStartDate', g_tskMgrHide);
			showHideElement('oTrPlannedEndDate', g_tskMgrHide);
			
			showHideElement('oTrProposable', g_tskMgrHide);
			showHideElement('oTrCompletion', g_tskMgrShow);
			showHideElement('oLiPredecessors', g_tskMgrHide);
			showHideElement('oTrAnswerEnable', g_tskMgrHide);
			showHideElement('oTrTaskResponsible', g_tskMgrHide);
		}
		break;
			
		case TODO:
		{
			showHideElement('oTrLinkedTask', g_tskMgrHide);
			showHideElement('oTrDurationType', g_tskMgrHide);
			showHideElement('oTrDuration', g_tskMgrHide);
			
			showHideElement('oTrStartDate', g_tskMgrHide);
			showHideElement('oTrEndDate', g_tskMgrShow);
			showHideElement('oTrPlannedStartDate', g_tskMgrHide);
			showHideElement('oTrPlannedEndDate', g_tskMgrHide);
			
			showHideElement('oTrProposable', g_tskMgrHide);
			showHideElement('oTrCompletion', g_tskMgrShow);
			showHideElement('oLiPredecessors', g_tskMgrHide);
			showHideElement('oTrAnswerEnable', g_tskMgrHide);
			showHideElement('oTrTaskResponsible', g_tskMgrHide);
		}
		break;
	}
	setPlannedEndDateCaption();
}

function onDurationTypeChanged(oSelect)
{
	//{}
	var DURATION = { m_datas[iDateTypeDuration] };
	var DATE = { m_datas[iDateTypeDate] };
	
	var iDurationType = parseInt(oSelect.options[oSelect.selectedIndex].value);

	switch(iDurationType)
	{
		case DURATION:
		{
			showHideElement('oTrDuration', g_tskMgrShow);
		}
		break;
		
		case DATE:
		{
			showHideElement('oTrDuration', g_tskMgrHide);
			showHideElement('oTrEndDate', g_tskMgrShow);
		}
		break;
	}
	
	processStartDate();
	setPlannedEndDateCaption();
}

function onLinkTaskChanged(oCheckBox)
{
	if(true == oCheckBox.checked)
	{
		showHideElement('oLiPredecessors', g_tskMgrShow);
	}
	else
	{
		showHideElement('oLiPredecessors', g_tskMgrHide);
	}
	
	processStartDate();
}

var g_tskMgrHide = 0;
var g_tskMgrShow = 1;

function showHideElement(sIdElement, iShow)
{
	var oElement = document.getElementById(sIdElement);
	if(null != oElement) 
	{
		oElement.style.display = (g_tskMgrHide == iShow) ? 'none' : '';
	}
}


function processStartDate()
{
	var oLinkedTask = document.getElementById("oLinkedTask");
	
	if(null != oLinkedTask && true == oLinkedTask.checked)
	{
		showHideElement('oTrPlannedStartDate', g_tskMgrHide);
	}
	else
	{
		showHideElement('oTrStartDate', g_tskMgrShow);
		showHideElement('oTrEndDate', g_tskMgrShow);
		showHideElement('oTrPlannedStartDate', g_tskMgrShow);
		showHideElement('oTrPlannedEndDate', g_tskMgrShow);
	}
}

function check_all(strCtrlName, checked)
{
	var form = document.forms.taskForm;

	var i;
	var objCtrl;

	for (i = 0; i < form.elements.length; i++)
	{
		objCtrl = form.elements[i];
		if(objCtrl.name.substring(0, strCtrlName.length) == strCtrlName)
		{
			objCtrl.checked = checked;
		}
	}
}



function onTaskResponsibleChanged()
{
	var oForm			= document.getElementById("taskForm");
	var oTrProposable	= document.getElementById("oTrProposable");
	var oSelect			= document.getElementById("iIdTaskResponsible");
	
	if(null != oForm && null != oTrProposable && null != oSelect)
	{
		var iIdSessUser			= oForm.iIdSessUser.value;
		var iIdTaskResponsible	= oSelect.value;
		
		if(iIdSessUser > 0 && iIdSessUser == iIdTaskResponsible)
		{
			oTrProposable.style.display = 'none';
		}
		else
		{
			oTrProposable.style.display = '';
		}
	}
}


document.onmousemove = bab_tooltipPosition;

//-->
</script>

<script type="text/javascript" src="{ babInstallPath }scripts/bab_dialog.js">document.onmousemove = bab_tooltipPosition;</script>


<style type="text/css">
	@import url('{ babInstallPath }styles/taskManager.css');
</style>

<form name="taskForm" id="taskForm" method="post" action="{ babPhpSelf }" onsubmit="return(submit_form())">
	<input type="hidden" name="tg" value="{ m_datas[tg] }" />
	<input type="hidden" name="idx" value="" />
	<input type="hidden" name="action" value="" />
	<input type="hidden" name="iIdProjectSpace" value="{ m_iIdProjectSpace }" />
	<input type="hidden" name="iIdProject" value="{ m_iIdProject }" />
	<input type="hidden" name="iIdTask" value="{ m_iIdTask }" />
	<input type="hidden" name="iMajorVersion" value="{ m_datas[iMajorVersion] }" />
	<input type="hidden" name="iMinorVersion" value="{ m_datas[iMinorVersion] }" />
	<input type="hidden" name="selectedDateFieldName" value="" />
	<input type="hidden" name="selectedMenu" value="" />
	<input type="hidden" name="sFromIdx" value="{ m_datas[sFromIdx] }" />
	<input type="hidden" name="isProject" value="{ m_datas[isProject] }" />
	<input type="hidden" name="iUseEditor" value="{ m_iUseEditor }" />
	<input type="hidden" name="iIdSessUser" value="{ m_iIdSessUser }" />
	
	<div class="BabSiteAdminTitleFontBackground" align="center">
		<!--#if m_datas[bIsProjectSpace] --><h4>{ m_captions[sProjectSpace] }:&nbsp;{ m_datas[sProjectSpace] }&nbsp;&nbsp;</h4><!--#endif m_datas[bIsProjectSpace] --><h5>{ m_captions[sProject] }:&nbsp;{ m_datas[sProject] }</h5>
	</div>
	<br />
	<div id="oDateFormat">{ m_captions[sDateFormat] }</div>
	<div class="BabLoginMenuBackground">
		<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
			<tr> 
				<td>
					<label for="sTaskNumber">{ m_captions[sTaskNumber] }</label>
				</td>
				<td>
					<input name="sTaskNumber" id="sTaskNumber" { m_datas[sTaskNumberReadOnly] } type="text" value="{ m_datas[sTaskNumber] }" />
				</td>
			</tr>
			<tr> 
				<td>
					<label for="iClass">{ m_captions[sClass] }</label>
				</td>
				<td>
					<select name="iClass" id="iClass" { m_datas[sDisabledClass] } onchange="onClassChanged(this)">
						<!--#in getNextClass -->
							<option { m_datas[sSelectedClass] } value="{ m_datas[iClassType] }">{ m_datas[sClassName] }</option>
						<!--#endin getNextClass -->
					</select>
				</td>
			</tr>
			<tr> 
				<td>
					<label for="iIdCategory">{ m_captions[sCategory] }</label>
				</td>
				<td>
					<select name="iIdCategory" { m_datas[sDisabledCategory] } id="iIdCategory">
						<option value=""></option>
						<!--#in getNextCategory -->
						<option { m_datas[sSelectedCategory] } value="{ m_datas[iIdCategory] }">{ m_datas[sCategoryName] }</option>
						<!--#endin getNextCategory -->
					</select>
				</td>
			</tr>
		</table>
		<ul id="tablist">
			<li id="oLiGeneral"><a class="" href="" onclick="onMenuSelected(this.parentNode);return false;">{ m_captions[sGeneral] }</a></li>
		<!--#if m_datas[isLinkable] -->
			<li id="oLiPredecessors"><a class="" href="" onclick="onMenuSelected(this.parentNode);return false;">{ m_captions[sPredecessors] }</a></li>
		<!--#endif m_datas[isLinkable] -->
		<!--#if m_iIdProject "!= 0" -->
		<!--#endif m_iIdProject -->
		<!--#if m_iIdTask "!= 0" -->
		
		<!--#if m_bIsManager -->
			<li id="oLiCost"><a class="" href="" onclick="onMenuSelected(this.parentNode);return false;">{ m_captions[sCostTab] }</a></li>
		<!--#endif m_bIsManager -->
			<li id="oLiCommentaries"><a class="" href="" onclick="onMenuSelected(this.parentNode);return false;">{ m_captions[sCommentaries] }</a></li>
			<li id="oLiSpfFld"><a class="" href="" onclick="onMenuSelected(this.parentNode);return false;">{ m_captions[sSpFld] }</a></li>
		<!--#endif m_iIdTask -->
		</ul>						
		<div id="sGeneral">
			<table width="95%" border="0" cellspacing="2" cellpadding="5" align="center">
				<tr>
					<td colspan="2"><label for="sShortDescription">{ m_captions[sShortDescription] }</label></td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="text" name="sShortDescription" id="sShortDescription" { m_datas[sReadonlyShortDescription] } maxlength="255" value="{ m_datas[sShortDescription] }" style="width:100%" />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						{ m_captions[sDescription] }<!--#if m_bDisplayEditorLink -->&nbsp;&nbsp;<a href="{ m_sEditTaskDescriptionUrl }">{ m_captions[sModify] }</a><!--#endif m_bDisplayEditorLink -->
					</td>
				</tr>
				<!--#if m_iUseEditor -->
				<tr>
					<td colspan="2">
						{ m_datas[sDescription] }
					</td>
				</tr>
				<!--#else m_iUseEditor -->
				<tr>
					<td colspan="2" style="background-color:white">
						{ m_datas[sDescription] }
					</td>
				</tr>
				<!--#endif m_iUseEditor -->
				
			<!--#if m_datas[isTaskPriority] -->
				<tr id="oTrTaskPriority">
					<td>
						<label for="oTaskPriority">{ m_captions[sTaskPriority] }</label>
					</td>
					<td>
						<select id="oTaskPriority" name="oTaskPriority">
							<!--#in getNextTaskPriority -->
							<option { m_datas[sSlectedTaskPriority] } value="{ m_datas[iIdTaskPriority] }">{ m_datas[iIdTaskPriority] }</option>
							<!--#endin getNextTaskPriority -->
						</select>
					</td>
				</tr>
			<!--#endif m_datas[isTaskPriority] -->
				
			<!--#if m_datas[isLinkable] -->
				<tr id="oTrLinkedTask">
					<td>
						<label for="oLinkedTask">{ m_captions[sLinkedTask] }</label>
					</td>
					<td>
						<input type="checkbox" name="oLinkedTask" id="oLinkedTask" { m_datas[sDisabledLinkedTask] } { m_datas[sCkeckedLinkedTask] } onclick="onLinkTaskChanged(this)" value="" style="background-color:transparent;border=0" />
					</td>
				</tr>
			<!--#endif m_datas[isLinkable] -->
	
			<!--#if m_datas[isResourceAvailable] -->
				<tr id="oTrTaskResponsible">
					<td>
						<label for="iIdTaskResponsible">{ m_captions[sTaskResponsible] }</label>
					</td>
					<td>
						<select id="iIdTaskResponsible" { m_datas[sReadOnlyTaskResponsible] } name="iIdTaskResponsible" onchange="onTaskResponsibleChanged()">
							<option value="{ m_datas[iNone] }">{ m_captions[sNone] }</option>
							<!--#in getNextTaskResponsible -->
							<option { m_datas[sSlectedTaskResponsible] } value="{ m_datas[iIdTaskResponsible] }">{ m_datas[sTaskResponsibleName] }</option>
							<!--#endin getNextTaskResponsible -->
						</select>
					</td>
				</tr>
			<!--#endif m_datas[isResourceAvailable] -->

			<!--#if m_datas[isProposable] -->
				<tr id="oTrProposable" class="">
					<td>
						<label for="oProposable">{ m_captions[sProposable] }</label>
					</td>
					<td>
						<select id="oProposable" name="oProposable">
							<!--#in getNextProposable -->
							<option { m_datas[sSelectedProposable] } value="{ m_datas[iProposable] }">{ m_datas[sProposable] }</option>
							<!--#endin getNextProposable -->
						</select>
					</td>
				</tr>
			<!--#endif m_datas[isProposable] -->
	
				<tr id="oTrDurationType" class="">
					<td>
						<label for="oDurationType">{ m_captions[sDurationType] }</label>
					</td>
					<td>
						<select id="oDurationType" name="oDurationType" { m_datas[sDisabledDurationType] } onchange="onDurationTypeChanged(this)">
							<!--#in getNextDurationType -->
							<option { m_datas[sSelectedDuration] } value="{ m_datas[iDurationType] }">{ m_datas[sDurationName] }</option>
							<!--#endin getNextDurationType -->
						</select>
					</td>
				</tr>
	
				<tr id="oTrDuration">
					<td>
						<label for="sDuration">{ m_captions[sDuration] }</label>
					</td>
					<td>
						<input type="text" name="sDuration" { m_datas[sReadOnlyDuration] } id="sDuration" maxlength="20" value="{ m_datas[sDuration] }" size="10" />
						&nbsp;
						{ m_captions[sType] }:&nbsp;					
						<select id="oDurationUnit" name="oDurationUnit" { m_datas[sDisabledDurationType] } >
							<!--#in getNextTaskDurationUnit -->
							<option { m_datas[sSelectedDurationUnit] } value="{ m_datas[iDurationUnit] }">{ m_datas[sDurationUnitName] }</option>
							<!--#endin getNextTaskDurationUnit -->
						</select>
					</td>
				</tr>
	
				<tr id="oTrPlannedStartDate">
					<td>
						<label for="sPlannedStartDate">{ m_captions[sPlannedStartDate] }</label>
					</td>
					<td>
						<input type="text" name="sPlannedStartDate" id="sPlannedStartDate" { m_datas[sReadOnlyPlannedStartDate] } maxlength="20" value="{ m_datas[sPlannedStartDate] }" size="10" />
						<img src="{ babInstallPath }skins/ovidentia/images/Puces/help.png" alt="" onmouseout="bab_showOnMouse('oDateFormat', 0)" onmouseover="bab_showOnMouse('oDateFormat', 1)" />
					<!--#if m_datas[isReadOnlyPlannedStartDate] "!= 1" -->
						<a href="javascript:dateCallback('sPlannedStartDate');">
							<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/calendar.gif" alt="{ m_captions[sPlannedStartDate] }" />
						</a>
					<!--#else m_datas[isReadOnlyPlannedStartDate] -->
						<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/Space1PxTrans.gif" width="16px" />
					<!--#endif m_datas[isReadOnlyPlannedStartDate] -->
				
						<select id="oPlannedStartHour" name="oPlannedStartHour" { m_datas[sDisabledPlannedStartDateTime] } >
							<!--#in getNextPlannedStartHour -->
							<option value="{ m_datas[iHour] }" { m_datas[sSelectedPlannedStartHour] } >{ m_datas[sHour] }</option>
							<!--#endin getNextPlannedStartHour -->
						</select>:
						<select id="oPlannedStartMinut" name="oPlannedStartMinut" { m_datas[sDisabledPlannedStartDateTime] } >
							<!--#in getNextPlannedStartMinut -->
							<option value="{ m_datas[iMinut] }" { m_datas[sSelectedPlannedStartMinut] } >{ m_datas[sMinut] }</option>
							<!--#endin getNextPlannedStartMinut -->
						</select>
									
					</td>
				</tr>
	
				<tr id="oTrStartDate">
					<td>
						<label for="sStartDate">{ m_captions[sStartDate] }</label>
					</td>
					<td>
						<input type="text" name="sStartDate" id="sStartDate" { m_datas[sReadOnlyStartDate] } maxlength="20" value="{ m_datas[sStartDate] }" size="10" />
						<img src="{ babInstallPath }skins/ovidentia/images/Puces/help.png" alt="" onmouseout="bab_showOnMouse('oDateFormat', 0)" onmouseover="bab_showOnMouse('oDateFormat', 1)" />
					<!--#if m_datas[isReadOnlyStartDate] "!= 1" -->
						<a href="javascript:dateCallback('sStartDate');">
							<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/calendar.gif" alt="{ m_captions[sStartDate] }" />
						</a>
					<!--#else m_datas[isReadOnlyStartDate] -->
						<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/Space1PxTrans.gif" width="16px" />
					<!--#endif m_datas[isReadOnlyStartDate] -->

						<select id="oStartHour" name="oStartHour" { m_datas[sDisabledStartDateTime] } >
							<!--#in getNextStartHour -->
							<option value="{ m_datas[iHour] }" { m_datas[sSelectedStartHour] } >{ m_datas[sHour] }</option>
							<!--#endin getNextStartHour -->
						</select>:
						<select id="oStartMinut" name="oStartMinut" { m_datas[sDisabledStartDateTime] } >
							<!--#in getNextStartMinut -->
							<option value="{ m_datas[iMinut] }" { m_datas[sSelectedStartMinut] } >{ m_datas[sMinut] }</option>
							<!--#endin getNextStartMinut -->
						</select>
					
					</td>
				</tr>

				<tr id="oTrPlannedEndDate">
					<td>
						<label for="sPlannedEndDate" id="sPlannedEndDateCaption">{ m_captions[sPlannedEndDate] }</label>
					</td>
					<td>
						<input type="text" name="sPlannedEndDate" id="sPlannedEndDate" { m_datas[sReadOnlyPlannedEndDate] } maxlength="20" value="{ m_datas[sPlannedEndDate] }" size="10" />
						<img src="{ babInstallPath }skins/ovidentia/images/Puces/help.png" alt="" onmouseout="bab_showOnMouse('oDateFormat', 0)" onmouseover="bab_showOnMouse('oDateFormat', 1)" />
					<!--#if m_datas[isReadOnlyPlannedEndDate] "!= 1" -->
						<a href="javascript:dateCallback('sPlannedEndDate');">
							<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/calendar.gif" alt="{ m_captions[sPlannedEndDate] }" />
						</a>
					<!--#else m_datas[isReadOnlyPlannedEndDate] -->
						<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/Space1PxTrans.gif" width="16px" />
					<!--#endif m_datas[isReadOnlyPlannedEndDate] -->
				
						<select id="oPlannedEndHour" name="oPlannedEndHour" { m_datas[sDisabledPlannedEndDateTime] } >
							<!--#in getNextPlannedEndHour -->
							<option value="{ m_datas[iHour] }" { m_datas[sSelectedPlannedEndHour] } >{ m_datas[sHour] }</option>
							<!--#endin getNextPlannedEndHour -->
						</select>:
						<select id="oPlannedEndMinut" name="oPlannedEndMinut" { m_datas[sDisabledPlannedEndDateTime] } >
							<!--#in getNextPlannedEndMinut -->
							<option value="{ m_datas[iMinut] }" { m_datas[sSelectedPlannedEndMinut] } >{ m_datas[sMinut] }</option>
							<!--#endin getNextPlannedEndMinut -->
						</select>
									
					</td>
				</tr>
				
				<tr id="oTrEndDate">
					<td>
						<label for="sEndDate">{ m_captions[sEndDate] }</label>
					</td>
					<td>
						<input type="text" name="sEndDate" id="sEndDate" { m_datas[sReadOnlyEndDate] } maxlength="20" value="{ m_datas[sEndDate] }" size="10" />
						<img src="{ babInstallPath }skins/ovidentia/images/Puces/help.png" alt="" onmouseout="bab_showOnMouse('oDateFormat', 0)" onmouseover="bab_showOnMouse('oDateFormat', 1)" />
					<!--#if m_datas[isReadOnlyEndDate] "!= 1" -->
						<a href="javascript:dateCallback('sEndDate');">
							<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/calendar.gif" alt="{ m_captions[sEndDate] }" />
						</a>
					<!--#else m_datas[isReadOnlyEndDate] -->
						<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/Space1PxTrans.gif" width="16px" />
					<!--#endif m_datas[isReadOnlyEndDate] -->

					<select id="oEndHour" name="oEndHour" { m_datas[sDisabledEndDateTime] } >
						<!--#in getNextEndHour -->
						<option value="{ m_datas[iHour] }" { m_datas[sSelectedEndHour] } >{ m_datas[sHour] }</option>
						<!--#endin getNextEndHour -->
					</select>:
					<select id="oEndMinut" name="oEndMinut" { m_datas[sDisabledEndDateTime] } >
						<!--#in getNextEndMinut -->
						<option value="{ m_datas[iMinut] }" { m_datas[sSelectedEndMinut] } >{ m_datas[sMinut] }</option>
						<!--#endin getNextEndMinut -->
					</select>
					
					</td>
				</tr>
					
			<!--#if m_datas[isCompletionEnabled] -->
				<tr id="oTrCompletion" class="">
					<td>
						<label for="oCompletion">{ m_captions[sCompletion] }</label>
					</td>
					<td>
						<select id="oCompletion" name="oCompletion">
							<!--#in getNextCompletion -->
							<option { m_datas[sSelectedCompletion] } value="{ m_datas[iCompletion] }">{ m_datas[iCompletion] } %</option>
							<!--#endin getNextCompletion -->
						</select>
					</td>
				</tr>
			<!--#endif m_datas[isCompletionEnabled] -->
			<!--#if m_datas[isAnswerEnable] -->
				<tr id="oTrAnswerEnable" class="">
					<td>
						<label for="oAnswerEnable">{ m_captions[sAnwser] }</label>
					</td>
					<td>
						<select id="oAnswerEnable" name="oAnswerEnable">
							<!--#in getNextAnswer -->
							<option value="{ m_datas[iProposable] }">{ m_datas[sProposable] }</option>
							<!--#endin getNextAnswer -->
						</select>
					</td>
				</tr>
			<!--#endif m_datas[isAnswerEnable] -->
			</table>
		</div>
	<!--#if m_datas[isLinkable] -->
		<div id="sPredecessor" class="">
			<table border="0" cellspacing="0" cellpadding="2">
				<tr class="BabSiteAdminTitleFontBackground" align="center">
					<td>{ m_captions[sTaskNumber] }</td>
					<td>{ m_captions[sRelation] }</td>
					<td>{ m_captions[sPredecessorShortDescription] }</td>
				</tr>
				<tr> 
					<td colspan="3">
						<!--#in getNone -->
						<input class="BabLoginMenuBackground" { m_datas[sSelectedPredecessor] } type="radio" name="iPredecessor" value="{ m_datas[iNone] }" />{ m_captions[sNone] }
						<!--#endin getNone -->
					</td>
				</tr>
				<!--#in getNextPredecessor -->
				<tr> 
					<td>
						<input class="BabLoginMenuBackground" { m_datas[sSelectedPredecessor] } type="radio" name="iPredecessor" value="{ m_datas[iIdPredecessor] }" />{ m_datas[sPredecessorNumber] }
					</td>
					<td>
						<select id="oLinkType" name="oLinkType[{ m_datas[iIdPredecessor] }]">
							<!--#in getNextRelation -->
							<option { m_datas[sSelectedLinkType] } value="{ m_datas[iLink] }">{ m_datas[sLink] }</option>
							<!--#endin getNextRelation -->
						</select>
					</td>
					<td>&nbsp;&nbsp;&nbsp;{ m_datas[sPredecessorShortDescription] }</td>
				</tr>
				<!--#endin getNextPredecessor -->
			</table>
		</div>
	<!--#endif m_datas[isLinkable] -->

	<!--#if m_bIsManager -->
		<div id="sCost" class="">
			<table width="95%" border="0" cellspacing="3" cellpadding="2" align="center">
				<tr>
					<td colspan="2">
						&nbsp;
					</td>
				</tr>
				<tr id="oTrPlannedTime">
					<td>
						<label for="oPlannedTime">{ m_captions[sPlannedTime] }</label>
					</td>
					<td>
						<input type="text" name="oPlannedTime" id="oPlannedTime" { m_datas[sReadOnlyCost] } maxlength="20" value="{ m_datas[iPlannedTime] }" size="10" />
						<select id="oPlannedTimeDurationUnit" name="oPlannedTimeDurationUnit" { m_datas[sDisabledDurationUnit] } >
							<!--#in getNextPlannedTimeDurationUnit -->
							<option { m_datas[sSelectedDurationUnit] } value="{ m_datas[iDurationUnit] }">{ m_datas[sDurationUnitName] }</option>
							<!--#endin getNextPlannedTimeDurationUnit -->
						</select>
					</td>
				</tr>
				
				<tr id="oTrTime">
					<td>
						<label for="oTime">{ m_captions[sTime] }</label>
					</td>
					<td>
						<input type="text" name="oTime" id="oTime" { m_datas[sReadOnlyCost] } maxlength="20" value="{ m_datas[iTime] }" size="10" />
						<select id="oTimeDurationUnit" name="oTimeDurationUnit" { m_datas[sDisabledDurationUnit] } >
							<!--#in getNextTimeDurationUnit -->
							<option { m_datas[sSelectedDurationUnit] } value="{ m_datas[iDurationUnit] }">{ m_datas[sDurationUnitName] }</option>
							<!--#endin getNextTimeDurationUnit -->
						</select>
					</td>
				</tr>
				
				<tr id="oTrPlannedCost">
					<td>
						<label for="oPlannedCost">{ m_captions[sPlannedCost] }</label>
					</td>
					<td>
						<input type="text" name="oPlannedCost" id="oPlannedCost" { m_datas[sReadOnlyCost] } maxlength="20" value="{ m_datas[iPlannedCost] }" size="10" />
					</td>
				</tr>
				
				<tr id="oTrCost">
					<td>
						<label for="oCost">{ m_captions[sCost] }</label>
					</td>
					<td>
						<input type="text" name="oCost" id="oCost" { m_datas[sReadOnlyCost] } maxlength="20" value="{ m_datas[iCost] }" size="10" />
					</td>
				</tr>
			</table>
		</div>
	<!--#endif m_bIsManager -->

		
		<!--#if m_iIdTask "!= 0" -->
		<div id="sCommentaries" class="">
			<br/>
			{ m_datas[sTaskCommentaries] }
		</div>
		
		<div id="sSpfFld" class="">
			<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
				<tr>
					<td colspan="2">
						&nbsp;
					</td>
				</tr>
				<tr class="BabSiteAdminTitleFontBackground"> 
					<td>&nbsp;</td>
					<td colspan="3" align="center">
						{ m_captions[sSpFld] }
					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>{ m_captions[sField] }</td>
					<td>{ m_captions[sType] }</td>
					<td>{ m_captions[sValue] }</td>
				</tr>
				
				<!--#in getNextSpecificFieldInstance -->
				
			<!--#if m_datas[iSpFldInstanceClass] "== 0" -->
				<tr>
					<td>
						&nbsp;
					</td>
					<td>{ m_datas[sSpFldInstanceName] }</td>
					<td>{ m_datas[sSpFldInstanceType] }</td>
					<td><input type="text" name="aSpFldInstanceValue[{ m_datas[iSpFldInstanceId] }]" maxlength="65535" value="{ m_datas[sSpFldInstanceValue] }" size="40" /></td>
				</tr>
			<!--#endif m_datas[iSpFldInstanceClass] -->
			
			<!--#if m_datas[iSpFldInstanceClass] "== 1" -->
				<tr>
					<td>
						&nbsp;
					</td>
					<td>{ m_datas[sSpFldInstanceName] }</td>
					<td>{ m_datas[sSpFldInstanceType] }</td>
					<td><textarea id="commentary" name="aSpFldInstanceValue[{ m_datas[iSpFldInstanceId] }]" cols="10" rows="3">{ m_datas[sSpFldInstanceValue] }</textarea></td>
				</tr>
			<!--#endif m_datas[iSpFldInstanceClass] -->
			
			<!--#if m_datas[iSpFldInstanceClass] "== 2" -->
				<tr>
					<td>
						&nbsp;
					</td>
					<td>{ m_datas[sSpFldInstanceName] }</td>
					<td>{ m_datas[sSpFldInstanceType] }</td>
					
					<td>
						<select name="aSpFldInstanceValue[{ m_datas[iSpFldInstanceId] }]">
						<!--#in getNextSpecificFieldInstanceValue -->
						<option { m_datas[sSpFldInstanceSelected] } value="{ m_datas[sSpFldInstanceRdValue] }">{ m_datas[sSpFldInstanceRdValue] }</option>
						<!--#endin getNextSpecificFieldInstanceValue -->
						</select>
					</td>
				</tr>
			<!--#endif m_datas[iSpFldInstanceClass] -->
			
				
				<!--#endin getNextSpecificFieldInstance -->

					<tr class="BabSiteAdminTitleFontBackground">
						<td>
							&nbsp;
						</td>
						<td colspan="3" align="right">&nbsp;</td>
					</tr>
				
			</table>
		</div>
		<!--#endif m_iIdTask -->
		
		<br />
		<div align="center">
		<!--#if m_iIdTask "== 0" -->
			<input type="submit" value="{ m_captions[sAdd] }" onclick="on_btn_clicked('{ m_datas[iAddIdx] }', '{ m_datas[iAddAction] }')" />
		<!--#else m_iIdTask -->
				
			<!--#if m_datas[isModifiable] -->
			<input type="submit" value="{ m_captions[sModify] }" onclick="on_btn_clicked('{ m_datas[iModifyIdx] }', '{ m_datas[iModifyAction] }')" />
			<!--#endif m_datas[isModifiable] -->
				
			<!--#if m_datas[isDeletable] -->
			<input type="submit" value="{ m_captions[sDelete] }" onclick="on_btn_clicked('{ m_datas[iDeleteIdx] }', '{ m_datas[iDeleteAction] }')" />
			<!--#endif m_datas[isDeletable] -->
		<!--#endif m_iIdTask -->
		</div>
	</div>
</form>

<script type="text/javascript">
<!--
var oLiGeneral = document.getElementById('{ m_datas[selectedMenu] }');
if(null != oLiGeneral) onMenuSelected(oLiGeneral);
onClassChanged(document.forms.taskForm['iClass']);
onTaskResponsibleChanged();
//-->
</script>
<!--#end taskForm -->



<!--#begin taskCommentariesList -->
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
	<tr> 
		<td align="center" valign="middle" class="BabLoginCadreBackground"> 
			<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
				<tr class="BabSiteAdminTitleFontBackground"> 
					<td width="50%">{ m_captions[commentary] }</td>
					<td width="20%">{ m_captions[date] }</td>
				<!--#if m_datas[iIdTask] "!= 0" -->
					<td width="30%" align="center">
						<a href="javascript:bab_popup('{ m_datas[addCommentaryUrl] }',2)" title="{ m_captions[addCommentary] }">
							{ m_captions[addCommentary] }
						</a>
					</td> 
				<!--#else m_datas[iIdTask] -->
					<td width="30%" align="center">&nbsp;</td>
				<!--#endif m_datas[iIdTask] -->
				</tr>
				<!--#in nextCommentary -->
				
			<!--#if m_is_altbg -->
				<tr class="BabSiteAdminFontBackground"> 
			<!--#else m_is_altbg -->
				<tr class="BabForumBackground1">
			<!--#endif m_is_altbg -->
	
				<!--#if m_datas[isLink] -->
					<td><a href="javascript:bab_popup('{ m_datas[url] }{ m_datas[id] }',2)">{ m_datas[commentary] }</a></td>
				<!--#else m_datas[isLink] -->
					<td>{ m_datas[commentary] }</td>
				<!--#endif m_datas[isLink] -->
					<td>{ m_datas[created] }</td>
					<td>
						<table border="0" cellspacing="0" cellpadding="2" align="center">
							<!--#in getNextAnchor -->
							<tr>
								<td class="{ m_datas[className] }">
									<a href="{ m_anchorItem[href] }" title="{ m_anchorItem[title] }">
										{ m_anchorItem[title] }
									</a>
								</td>
							</tr>
							<!--#endin getNextAnchor -->
							<tbody><tr><td></td></tr></tbody>
						</table>
					</td>
				</tr>
				<!--#endin nextCommentary -->
			</table>
		</td>
	</tr>
</table>
<!--#end taskCommentariesList -->

<!--#begin taskListFilter -->
<script type="text/javascript">
//<![CDATA[
function on_btn_clicked(idx, action)
{
	var form = document.forms.taskListFilter;

	form.idx.value = idx;
	form.action.value = action;
}

function submit_form()
{
	return true;
}

function addTask(idx, action)
{
	var form = document.forms.taskListFilter;
	form.idx.value = idx;
	form.action.value = action;
	form.submit();
}

function getSelectCtrlValue(oCtrl)
{
	var form = document.forms.taskListFilter;
	var idx;

	for(idx = 0; idx < oCtrl.options.length; ++idx)
	{
		if(oCtrl.options[idx].selected)
		{
			return oCtrl.options[idx].value;
		}
	}
}

function onTaskFilterChanged(oCtrl, sHiddenName)
{
	var form = document.forms.taskListFilter;
	var aValue = getSelectCtrlValue(oCtrl).split('_');
	
	var iIdProject = aValue[0];
	var iIsManager = aValue[1];
	document.forms['taskListFilter'].elements[sHiddenName].value = iIdProject;
	
	var oAddBtn = document.getElementById('sAddTaskBtn');
	var oAddIcon = document.getElementById('oAddIcon');

	if(-1 != iIdProject && 1 == iIsManager)
	{
		if(null != oAddBtn)
		{
			oAddBtn.style.display = '';	
		}
		
		if(null != oAddIcon)
		{
			oAddIcon.style.display = '';	
		}
	}
	else
	{
		if(null != oAddBtn)
		{
			oAddBtn.style.display = 'none';	
		}
		
		if(null != oAddIcon)
		{
			oAddIcon.style.display = 'none';	
		}
	}
}

function setDateValue(aDate)
{
	var form = document.forms.taskListFilter;
	form[form.selectedDateFieldName.value].value =  aDate['day'] + '-' + aDate['month'] + '-' + aDate['year'];
}

function dateCallback(sFieldName)
{
	var form = document.forms.taskListFilter;
	form.selectedDateFieldName.value = sFieldName;
	bab_dialog.selectdate(setDateValue);
}

function tskMgr_showHideFilter()
{
	var oTaskListFilter = document.getElementById("taskListFilter");
	if(null !== oTaskListFilter)
	{
		tskMgr_showHide(oTaskListFilter);
	}
}

function tskMgr_showHide(oControl)
{
	if(oControl.style.display == "none")
	{
		oControl.style.display = "";
	}
	else
	{
		oControl.style.display = "none";
	}
}
//]]>
</script>

<script type="text/javascript" src="{ babInstallPath }scripts/bab_dialog.js"></script>


<form name="taskListFilter" id="taskListFilter" method="get" action="{ babPhpSelf }" onsubmit="return(submit_form())">
	<input type="hidden" name="tg" value="{ m_datas[tg] }" />
	<input type="hidden" name="idx" value="{ m_datas[idx] }" />
	<input type="hidden" name="iIdProjectSpace" value="{ m_datas[iIdProjectSpace] }" />
	<input type="hidden" name="iIdProject" value="{ m_datas[iIdProject] }" />
	<input type="hidden" name="isProject" value="{ m_datas[isProject] }" />
	<input type="hidden" name="selectedDateFieldName" value="" />
	<input type="hidden" name="iUseEditor" value="1" />
	<input type="hidden" name="iCompletion" value="{ m_datas[iCompletion] }" />
	<input type="hidden" name="sFromIdx" value="{ m_datas[sFromIdx] }" />
	
	
	<table width="99%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground">
				<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" class="tskMgrDialog">
				<tr>
					<td>{ m_captions[sProject] }</td>
					<td>
					<!--#if m_datas[isProjectDisplayed] -->
						<select name="oTaskFilter" onchange="onTaskFilterChanged(this, 'iIdProject')">
						<!--#in getNextTaskFilter -->
							<option value="{ m_datas[iTaskFilterValue] }_{ m_datas[iDisplayAddTask] }" { m_datas[sTaskFilterSelected] } >{ m_datas[sTaskFilterName] }</option>
						<!--#endin getNextTaskFilter -->
						</select>
					<!--#endif m_datas[isProjectDisplayed] -->
					<!--#if m_datas[bIsAddButton] -->
						<input type="submit" id="sAddTaskBtn" value="{ m_captions[sAddTask] }" onclick="on_btn_clicked('{ m_datas[sAddTaskIdx] }', '{ m_datas[sAddTaskAction] }')"  />
					<!--#endif m_datas[bIsAddButton] -->
					</td>
					<td>{ m_captions[sTaskType] }</td>
					<td>
						<select name="oTaskTypeFilter">
						<!--#in getNextTaskTypeFilter -->
							<option value="{ m_datas[iTaskTypeFilterValue] }" { m_datas[sTaskTypeFilterSelected] } >{ m_datas[sTaskTypeFilterName] }</option>
						<!--#endin getNextTaskTypeFilter -->
						</select>
					</td>
				</tr>
				<tr>
					<td>
						<label for="_sStartDate">{ m_captions[sStartDate] }</label>
					</td>
					<td>
						<input type="text" name="_sStartDate" id="_sStartDate" maxlength="20" value="{ m_datas[sStartDate] }" size="10" />
						<a href="javascript:dateCallback('_sStartDate');">
							<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/calendar.gif" alt="{ m_captions[sStartDate] }" />
						</a>&nbsp;&nbsp;
						<select id="_oStartHour" name="_oStartHour">
							<!--#in getNextStartHour -->
							<option value="{ m_datas[iHour] }" { m_datas[sSelectedStartHour] } >{ m_datas[sHour] }</option>
							<!--#endin getNextStartHour -->
						</select>:
						<select id="_oStartMinut" name="_oStartMinut">
							<!--#in getNextStartMinut -->
							<option value="{ m_datas[iMinut] }" { m_datas[sSelectedStartMinut] } >{ m_datas[sMinut] }</option>
							<!--#endin getNextStartMinut -->
						</select>
					</td>
					<td>
						<label for="_sEndDate">{ m_captions[sEndDate] }</label>
					</td>
					<td>
						<input type="text" name="_sEndDate" id="_sEndDate" maxlength="20" value="{ m_datas[sEndDate] }" size="10" />
						<a href="javascript:dateCallback('_sEndDate');">
							<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/calendar.gif" alt="{ m_captions[sEndDate] }" />
						</a>&nbsp;&nbsp;
						<select id="_oEndHour" name="_oEndHour">
							<!--#in getNextEndHour -->
							<option value="{ m_datas[iHour] }" { m_datas[sSelectedEndHour] } >{ m_datas[sHour] }</option>
							<!--#endin getNextEndHour -->
						</select>:
						<select id="_oEndMinut" name="_oEndMinut">
							<!--#in getNextEndMinut -->
							<option value="{ m_datas[iMinut] }" { m_datas[sSelectedEndMinut] } >{ m_datas[sMinut] }</option>
							<!--#endin getNextEndMinut -->
						</select>
					</td>
				</tr>
				<tr>
					<td>
						<label for="_sPlannedStartDate">{ m_captions[sPlannedStartDate] }</label>
					</td>
					<td>
						<input type="text" name="_sPlannedStartDate" id="_sPlannedStartDate" maxlength="20" value="{ m_datas[sPlannedStartDate] }" size="10" />
						<a href="javascript:dateCallback('_sPlannedStartDate');">
							<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/calendar.gif" alt="{ m_captions[sPlannedStartDate] }" />
						</a>&nbsp;&nbsp;
						<select id="_oPlannedStartHour" name="_oPlannedStartHour">
							<!--#in getNextPlannedStartHour -->
							<option value="{ m_datas[iHour] }" { m_datas[sSelectedPlannedStartHour] } >{ m_datas[sHour] }</option>
							<!--#endin getPlannedNextStartHour -->
						</select>:
						<select id="_oPlannedStartMinut" name="_oPlannedStartMinut">
							<!--#in getNextPlannedStartMinut -->
							<option value="{ m_datas[iMinut] }" { m_datas[sSelectedPlannedStartMinut] } >{ m_datas[sMinut] }</option>
							<!--#endin getPlannedNextStartMinut -->
						</select>
					</td>
					<td>
						<label for="_sPlannedEndDate">{ m_captions[sPlannedEndDate] }</label>
					</td>
					<td>
						<input type="text" name="_sPlannedEndDate" id="_sPlannedEndDate" maxlength="20" value="{ m_datas[sPlannedEndDate] }" size="10" />
						<a href="javascript:dateCallback('_sPlannedEndDate');">
							<img border="0" src="{ babInstallPath }skins/ovidentia/images/Puces/calendar.gif" alt="{ m_captions[sPlannedEndDate] }" />
						</a>&nbsp;&nbsp;
						<select id="_oPlannedEndHour" name="_oPlannedEndHour">
							<!--#in getNextPlannedEndHour -->
							<option value="{ m_datas[iHour] }" { m_datas[sSelectedPlannedEndHour] } >{ m_datas[sHour] }</option>
							<!--#endin getNextPlannedEndHour -->
						</select>:
						<select id="_oPlannedEndMinut" name="_oPlannedEndMinut">
							<!--#in getNextPlannedEndMinut -->
							<option value="{ m_datas[iMinut] }" { m_datas[sSelectedPlannedEndMinut] } >{ m_datas[sMinut] }</option>
							<!--#endin getNextPlannedEndMinut -->
						</select>
					</td>
				</tr>
				
				<tr>
					<!--#if isProject -->
					<td>
						<label for="iIdOwner">{ m_captions[sTaskResponsible] }</label>
					</td>
					<td>
						<select name="iIdOwner">
								<option value=""></option>
							<!--#in getNextTaskResponsible -->
								<option { m_datas[sSelectedUserName] } value="{ m_datas[idResponsible] }">{ m_datas[sUserName] }</option>
							<!--#endin getNextTaskResponsible -->
						</select>
					</td>
					<!--#else isProject -->
					<td>
						&nbsp;
					</td>
					<td>
						&nbsp;
					</td>
					<!--#endif isProject -->
					<td>
						<label for="iCompletion">{ m_captions[sCompletion] }</label>
					</td>
					<td>
						<select name="iCompletion">
							<!--#in getNextTaskCompletion -->
								<option { m_datas[sSelectedTaskCompletion] } value="{ m_datas[iTaskCompletionValue] }">{ m_datas[sTaskCompletionText] }</option>
							<!--#endin getNextTaskCompletion -->
						</select>
					</td>
				</tr>
				
				<tr>
					<td colspan="4">
						&nbsp;
					</td>
				</tr>
				<tr align="center">
					<td colspan="4">
						<input type="submit" value="{ m_captions[sFilter] }" onclick="on_btn_clicked('{ m_datas[sFilterIdx] }', '{ m_datas[sFilterAction] }')"  />
					</td>
				</tr>
				</table>
			</td>
		</tr>
	</table>
	<br />
</form>
<script type="text/javascript">
//<![CDATA[
<!--#if m_datas[isProjectDisplayed] -->
	onTaskFilterChanged(document.forms.taskListFilter.oTaskFilter, 'iIdProject');
<!--#endif m_datas[isProjectDisplayed] -->
tskMgr_showHideFilter();
//]]>
</script>

<!--#end taskListFilter -->


<!--#begin PersonnalTaskConfiguration -->
<script type="text/javascript">
<!--
function on_btn_clicked(idx, action)
{
	var form = document.forms.PersonnalTaskConfiguration;

	form.idx.value = idx;
	form.action.value = action;
}

function submit_form()
{
	return true;
}
//-->
</script>

<form name="PersonnalTaskConfiguration" method="post" action="{ babPhpSelf }" onsubmit="return(submit_form())">
	<input type="hidden" name="tg" value="{ m_datas[tg] }" />
	<input type="hidden" name="idx" value="" />
	<input type="hidden" name="action" value="" />

	<table width="85%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground">
				<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" class="BabLoginMenuBackground">
					<tr> 
						<td>
							{ m_captions[notice] }
						</td>
						<td>
							<input type="text" size="9" maxlength="9" name="iEndTaskReminder" value="{ m_datas[endTaskReminder] }" />&nbsp;{ m_captions[days] }
						</td>
					</tr>
					<tr> 
						<td>
							{ m_captions[taskNumerotation] }
						</td>
						<td>
							<select name="iTaskNumerotation"> 
							<!--#in getNextTaskNumerotation -->
								<option value="{ m_datas[tmCode] }" { m_datas[tnSelected] }>{ m_datas[tmValue] }</option>
							<!--#endin getNextTaskNumerotation -->
							</select>
						</td>
					</tr>
					<tr> 
						<td>
							{ m_captions[emailNotice] }
						</td>
						<td>
							<select name="iEmailNotice"> 
							<!--#if m_datas[isEmailNotice] -->
								<option value="{ m_datas[yes] }" selected="selected">{ m_captions[yes] }</option>
								<option value="{ m_datas[no] }">{ m_captions[no] }</option>
							<!--#else m_datas[isEmailNotice] -->
								<option value="{ m_datas[yes] }">{ m_captions[yes] }</option>
								<option value="{ m_datas[no] }" selected="selected">{ m_captions[no] }</option>
							<!--#endif m_datas[isEmailNotice] -->
							</select>
						</td>
					</tr>

					<tr>
						<td colspan="2" align="center">
							<input type="submit" value="{ m_captions[save] }" onclick="on_btn_clicked('{ m_datas[save_idx] }', '{ m_datas[save_action] }')" />
						</td>
					</tr>

				</table>
			</td>
		</tr>
	</table>
</form>
<!--#end PersonnalTaskConfiguration -->
				
<?xml version="1.0" encoding="ISO-8859-1"?> 

<!--#begin gantt -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>{ m_sTitle }</title>
		<meta http-equiv="Content-type" content="{ sContent }"/>
		<link rel="stylesheet" type="text/css" href="{ babInstallPath }styles/gantt.css" />
		<script type="text/javascript" src="{ babInstallPath }scripts/ovidentia.js"></script>
		<script type="text/javascript" src="{ babInstallPath }scripts/tmGantt.js"></script>
		<script type="text/javascript">
			//<![CDATA[
			function gotoDate(day, month, year)
			{
				//{}
				document.location.href='{ m_sGotoDateUrl }' + year + '-' + month + '-' + day;
			}

			bab_initFunctions.push(function() { document.onmousemove = bab_tooltipPosition; });
			//]]>
		</script>
	</head>
	<body>
		<div class="ganttMainTitle"><h1>{ m_sMainTitle }</h1></div>
		<div class="ganttMainContainer">		
			<div class="gantt">
				<div class="ganttNav" style="top:{ m_iNavPosY }px; left:{ m_iNavPosX }px; height:{ m_iNavHeight }px; width:{ m_iNavWidth }px">
					<a class="ganttPrevWeek" style="top:{ m_iPrevWeekPosY }px; left:{ m_iPrevWeekPosX }px; height:{ m_iPrevWeekHeight }px; width:{ m_iPrevWeekWidth }px" href="{ m_sPrevWeekUrl }" title="{ m_sPrevWeek }">&nbsp;&nbsp;</a>
					<a class="ganttPrevMonth" style="top:{ m_iPrevMonthPosY }px; left:{ m_iPrevMonthPosX }px; height:{ m_iPrevMonthHeight }px; width:{ m_iPrevMonthWidth }px" href="{ m_sPrevMonthUrl }" title="{ m_sPrevMonth }">&nbsp;&nbsp;</a>
					<a class="ganttgotoDate" style="top:{ m_iGotoDatePosY }px; left:{ m_iGotoDatePosX }px; height:{ m_iGotoDateHeight }px; width:{ m_iGotoDateWidth }px" href="#" onclick="Start('{ babUrlScript }?tg=month&amp;callback=gotoDate&amp;ymin=30&amp;ymax=30', 'CalendarWindow', 'width=250,height=250,status=no,resizable=no,top=200,left=200');" title="{ m_sGotoDate }"><span>{ m_sGotoDate }</span></a>
					<a class="ganttNextMonth" style="top:{ m_iNextMonthPosY }px; left:{ m_iNextMonthPosX }px; height:{ m_iNextMonthHeight }px; width:{ m_iNextMonthWidth }px" href="{ m_sNextMonthUrl }" title="{ m_sNextMonth }">&nbsp;&nbsp;</a>
					<a class="ganttNextWeek" style="top:{ m_iNextWeekPosY }px; left:{ m_iNextWeekPosX }px; height:{ m_iNextWeekHeight }px; width:{ m_iNextWeekWidth }px" href="{ m_sNextWeekUrl }" title="{ m_sNextWeek }">&nbsp;&nbsp;</a>
				</div>
				<div class="ganttHeader" style="top:{ m_iGanttHeaderPosY }px; left:{ m_iGanttHeaderPosX }px; height:{ m_iGanttHeaderHeight }px; width:{ m_iGanttHeaderWidth }px">
					<!--#in getNextMonth -->
					<div class="ganttMonth" style="top:{ m_iMonthPosY }px; left:{ m_iMonthPosX }px; height:{ m_iMonthHeigth }px; width:{ m_iMonthWidth }px; border-width:{ m_iBorderTop }px { m_iBorderRight }px { m_iBorderBottom }px { m_iBorderLeft }px;">
						<div style="overflow:hidden; height:{ m_iMonthHeigth }px;" title="{ m_sMonth }">{ m_sMonth }</div>
					</div>
					<!--#endin getNextMonth -->
			
					<!--#in getNextWeekNumber -->
					<div class="ganttWeekNumber" style="width:{ m_iWeekWidth }px; top:{ m_iWeekPosY }px; left:{ m_iWeekPosX }px; height:{ m_iWeekHeigth }px; border-width:{ m_iBorderTop }px { m_iBorderRight }px { m_iBorderBottom }px { m_iBorderLeft }px;">
						<div style="text-align:center; overflow:hidden; height:{ m_iWeekHeigth }px;" title="{ m_sWeek }">{ m_sWeek }</div>
					</div>
					<!--#endin getNextWeekNumber -->
				
					<!--#in getNextDay -->
					<div class="ganttDay" style="top:{ m_iDayPosY }px; left:{ m_iDayPosX }px; height:{ m_iDayHeigth }px; width:{ m_iDayWidth }px; border-width:{ m_iBorderTop }px { m_iBorderRight }px { m_iBorderBottom }px { m_iBorderLeft }px;">
						<div style="text-align:center; overflow:hidden; height:{ m_iDayHeigth }px;" title="{ m_sDay }">{ m_sDay }<br />{ m_sMday }</div>
					</div>
					<!--#endin getNextDay -->
				</div>
				
				<div class="ganttTasks" style="top:{ m_iGanttTasksPosY }px; left:{ m_iGanttTasksPosX }px; height:{ m_iGanttTasksHeight }px; width:{ m_iGanttTasksWidth }px;">
					
					<!--#in getNextTaskTitle -->						
					<div class="ganttTaskTitle" style="top:{ m_iTaskTitlePosY }px; left:{ m_iTaskTitlePosX }px; height:{ m_iTaskTitleHeigth }px; width:{ m_iTaskTitleWidth }px; border-width:{ m_iBorderTop }px { m_iBorderRight }px { m_iBorderBottom }px { m_iBorderLeft }px;">
						{ m_sTaskTitle }
					</div>
					<!--#endin getNextTaskTitle -->
					
					<div class="ganttTasksList" style="top:{ m_iGanttTasksListPosY }px; left:{ m_iGanttTasksListPosX }px; height:{ m_iGanttTasksListHeight }px; width:{ m_iGanttTasksListWidth }px;">
						<!--#in getNextTaskItem -->
						<div style="color:#{ m_sTaskInfoColor }; background-color:#{ m_sTaskInfoBgColor };top:{ m_iTaskInfoPosY }px; left:{ m_iTaskInfoPosX }px; height:{ m_iTaskInfoHeigth }px; width:{ m_iTaskInfoWidth }px; border-width:{ m_iBorderTop }px { m_iBorderRight }px { m_iBorderBottom }px { m_iBorderLeft }px;">
						{ m_sTaskInfo }
						</div>
						<!--#endin getNextTaskItem -->	
					</div>
				
				</div>
	
				<div class="ganttView" style="top:{ m_iGanttViewPosY }px; left:{ m_iGanttViewPosX }px; height:{ m_iGanttViewHeight }px; width:{ m_iGanttViewWidth }px;">
					<!--#in getNextColumn -->
					<div class="ganttColumn { m_sTodayColumnAddClass }" style="top:{ m_iColumnPosY }px; left:{ m_iColumnPosX }px; height:{ m_iColumnHeigth }px; width:{ m_iColumnWidth }px">
					</div>
				<!--#if m_isToday -->
					<div class="ganttTodayLine" style="top:{ m_iColumnPosY }px; left:{ m_iTodayPosLineX }px; height:{ m_iColumnHeigth }px">
					</div>
				<!--#endif m_isToday -->
					<!--#endin getNextColumn -->	
		
					<!--#in getNextRow -->
					<div class="ganttRow" style="top:{ m_iRowPosY }px; left:{ m_iRowPosX }px; height:{ m_iRowHeigth }px; width:{ m_iRowWidth }px;">
					</div>
					<!--#endin getNextRow -->	
		
					<!--#in getNextTask -->
						<!--#in getNextTaskPeriod -->
							<div class="{ m_sTaskClass }" onmouseout="bab_showOnMouse('calevent{ m_iIdTask }',0)" onmouseover="bab_showOnMouse('calevent{ m_iIdTask }',1)" style="top:{ m_iTaskPosY }px; left:{ m_iTaskPosX }px; height:{ m_iTaskHeigth }px; width:{ m_iTaskWidth }px;"></div>
						<!--#endin getNextTaskPeriod -->	
						<div class="ganttTooltip" id="calevent{ m_iIdTask }">
							{ m_sToolTip }
						</div>
					<!--#endin getNextTask -->	
					<div id="ganttLegend" style="top:{ m_iRowPosY }px; left:{ m_iRowPosX }px; width:600px; height:100px">
						{ m_sGanttLegend }
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
<!--#end gantt -->


<!--#begin ganttLegend -->
	<ul>
		<!--#in getNextLegendItem -->
		<li>
			<span class="ganttLegendItem { sClassName }" title="{ sTitle }">&nbsp;</span>{ sCaption }
		</li>
		<!--#endin getNextLegendItem -->
	</ul>
<!--#end ganttLegend -->


<!--#begin toolbar -->
	<div class="bab_toolbar" style="vertical-align: middle; margin-bottom: 10px; padding: 8px; background-color: #eeeeee; border:0px">
	<!--#in getNextItem -->
		<a style="text-decoration: none" href="{ sUrl }" title="{ sTitle }" <!--#if sId "!= ''" --> id="{ sId }" <!--#endif sId --> >
			<img style="vertical-align: middle; margin-left: 10px; border:0px" src="{ babInstallPath }skins/ovidentia/images/Puces/{ sImg }" alt="{ sAlt }" /> { sText }
		</a>
	<!--#endin getNextItem -->
	</div>
<!--#end toolbar -->


<!--#begin projectProperties -->
<script type="text/javascript">
<!--
function on_btn_clicked(idx, action)
{
	var form = document.forms.projectProperties;

	form.idx.value = idx;
	form.action.value = action;
}

function submit_form()
{
	return true;
}
//-->
</script>

<form name="projectProperties" method="post" action="{ babPhpSelf }" onsubmit="return(submit_form())">
	<input type="hidden" name="tg" value="{ m_datas[tg] }" />
	<input type="hidden" name="idx" value="" />
	<input type="hidden" name="action" value="" />
	<input type="hidden" name="iIdConfiguration" value="{ m_datas[iIdConfiguration] }" />
	<input type="hidden" name="iIdProjectSpace" value="{ m_datas[iIdProjectSpace] }" />
	<input type="hidden" name="iIdProject" value="{ m_datas[iIdProject] }" />

<!--#if m_datas[isProjectCreator] -->
	<fieldset>
		<legend>{ m_captions[Project] }</legend>
		<br />
		<table width="85%" border="0" cellspacing="0" cellpadding="2" align="center">
			<tr> 
				<td class="BabLoginCadreBackground">
					<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" class="BabLoginMenuBackground">
						<tr> 
							<td>
								{ m_captions[sName] }
							</td>
							<td>
								<input type="text" name="sName" size="25" maxlength="255" value="{ m_datas[sName] }" />
							</td>
						</tr>
	
						<tr> 
							<td>
								{ m_captions[sDescription] }
							</td>
							<td>
								<textarea name="sDescription" cols="50" rows="10">{ m_datas[sDescription] }</textarea>
							</td>
						</tr>
	
						<tr> 
							<td colspan="2">
								<br />
							</td>
						</tr>
	
					</table>
				</td>
			</tr>
		</table>
	</fieldset>
<!--#endif m_datas[isProjectCreator] -->
	
<!--#if m_datas[isProjectManager] -->
	<fieldset>
		<legend>{ m_captions[Configuration] }</legend>
		<br />
		<table width="85%" border="0" cellspacing="0" cellpadding="2" align="center">
			<tr> 
				<td class="BabLoginCadreBackground">
					<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" class="BabLoginMenuBackground">
						<tr> 
							<td>
								{ m_captions[taskUpdate] }
							</td>
							<td>
								<select name="iTaskUpdateByMgr"> 
								<!--#if m_datas[isTaskUpdatedByMgr] -->
									<option value="{ m_datas[yes] }" selected="selected">{ m_captions[yes] }</option>
									<option value="{ m_datas[no] }">{ m_captions[no] }</option>
								<!--#else m_datas[isTaskUpdatedByMgr] -->
									<option value="{ m_datas[yes] }">{ m_captions[yes] }</option>
									<option value="{ m_datas[no] }" selected="selected">{ m_captions[no] }</option>
								<!--#endif m_datas[isTaskUpdatedByMgr] -->
								</select>
							</td>
						</tr>
						<!--
						<tr> 
							<td>
								{ m_captions[notice] }
							</td>
							<td>
								<input type="text" size="9" maxlength="9" name="iEndTaskReminder" value="{ m_datas[endTaskReminder] }" />&nbsp;{ m_captions[days] }
							</td>
						</tr>
						-->
						<tr> 
							<td>
								{ m_captions[taskNumerotation] }
							</td>
							<td>
							<!--#if m_datas[isProjectEmpty] -->
								<select name="iTaskNumerotation"> 
								<!--#in getNextTaskNumerotation -->
									<option value="{ m_datas[tmCode] }" { m_datas[tnSelected] }>{ m_datas[tmValue] }</option>
								<!--#endin getNextTaskNumerotation -->
								</select>
							<!--#else m_datas[isProjectEmpty] -->
								<input type="text" readonly="readonly" size="60" value="{ m_datas[tmValue] }" />
							<!--#endif m_datas[isProjectEmpty] -->
							</td>
						</tr>
						<tr> 
							<td>
								{ m_captions[emailNotice] }
							</td>
							<td>
								<select name="iEmailNotice"> 
								<!--#if m_datas[isEmailNotice] -->
									<option value="{ m_datas[yes] }" selected="selected">{ m_captions[yes] }</option>
									<option value="{ m_datas[no] }">{ m_captions[no] }</option>
								<!--#else m_datas[isEmailNotice] -->
									<option value="{ m_datas[yes] }">{ m_captions[yes] }</option>
									<option value="{ m_datas[no] }" selected="selected">{ m_captions[no] }</option>
								<!--#endif m_datas[isEmailNotice] -->
								</select>
							</td>
						</tr>
						<!--
						<tr> 
							<td>
								{ m_captions[faq] }
							</td>
							<td>
								<input type="text" size="60" maxlength="9" name="sFaqUrl" value="{ m_datas[faqUrl] }" />
							</td>
						</tr>
						-->
					</table>
				</td>
			</tr>
		</table>
	</fieldset>
<!--#endif m_datas[isProjectManager] -->
	
	<br />
	<div align="center">
		<input type="submit" value="{ m_captions[update] }" onclick="on_btn_clicked('{ m_datas[update_idx] }', '{ m_datas[update_action] }')" />
		<!--#if m_datas[bIsDeletable] -->
			<input type="submit" value="{ m_captions[delete] }" onclick="on_btn_clicked('{ m_datas[delete_idx] }', '{ m_datas[delete_action] }')" />
		<!--#endif m_datas[bIsDeletable] -->
	</div>
	
</form>
<!--#end projectProperties -->

<!--#begin pagination -->
	<div class="bab_buttons">
	<!--#if bIsPrevUrl -->
		<a href="{ sPrevPageUrl }">{ sPrevPageText }</a>&nbsp;
	<!--#else bIsPrevUrl -->
		{ sPrevPageText }&nbsp;
	<!--#endif bIsPrevUrl -->

	<!--#in getNextPage -->
		<!--#if bIsPageUrl -->
			<a href="{ sPageUrl }">{ sPageText }</a>&nbsp;
		<!--#else bIsPageUrl -->
			{ sPageText }&nbsp;
		<!--#endif bIsPageUrl -->
	<!--#endin getNextPage -->

	<!--#if bIsNextUrl -->
		<a href="{ sNextPageUrl }">{ sNextPageText }</a>&nbsp;
	<!--#else bIsNextUrl -->
		{ sNextPageText }
	<!--#endif bIsNextUrl -->
	</div>
<!--#end pagination -->

<!--#begin img -->
<img src="{ m_sImgSrc }" alt="{ m_sImgText }" title="{ m_sImgText }" border="0" />
<!--#end img -->

<!--#begin taskMultipage -->
<script type="text/javascript">
<!--
function get_selectCtrl_value(oCtrl)
{
	var form = document.forms.multipage;
	var idx;

	for(idx = 0; idx < oCtrl.options.length; ++idx)
	{
		if(oCtrl.options[idx].selected)
		{
			return oCtrl.options[idx].value;
		}
	}
}

function on_selectCtrl_changed(oCtrl, sHiddenName)
{
	var form = document.forms.multipage;
	document.forms['multipage'].elements[sHiddenName].value = get_selectCtrl_value(oCtrl);
	form.submit();
}

function onNbRowPerPageChanged()
{
	var form = document.forms.multipage;
	form.submit();
}

function hideOnNbRowPerPageChangedButton()
{
	var form = document.forms.multipage;
	document.forms['multipage'].elements['_onNbRowPerPageChanged'].style.display = 'none';
	
}
//-->
</script>
<form method="get" action="{ babPhpSelf }" name="multipage">
	<input type="hidden" name="tg" value="{ sTg }" />
	<input type="hidden" name="idx" value="{ sIdx }" />
	<!--#in getNextAdditionnalParameter -->
	<input type="hidden" name="{ m_sAdditionnalParameterName }" value="{ m_sAdditionnalParameterValue }" />
	<!--#endin getNextAdditionnalParameter -->
	<input type="hidden" name="action" value="" />

	<table width="99%" border="0" cellspacing="0" cellpadding="2" align="center" class="BabLoginCadreBackground">
		<tr> 
			<td> 
				<table class="taskManager" width="100%" cellspacing="0" cellpadding="2" class="BabLoginMenuBackground">

					<thead>
						<tr class="BabSiteAdminTitleFontBackground { sClassName }"> 
							<th>&nbsp;</th>
						<!--#in getNextColumnHeader -->
							<th>
							<!--#in getNextColumnHeaderItem -->
									<!--#if bIsColumnHeaderUrl -->
										<a href="{ sColumnHeaderUrl }" title="{ sColumnHeaderText }">{ sColumnHeaderText }</a>
									<!--#else bIsColumnHeaderUrl -->
										{ sColumnHeaderText }
									<!--#endif bIsColumnHeaderUrl -->
								<br/>	
							<!--#endin getNextColumnHeaderItem -->
							</th>
						<!--#endin getNextColumnHeader -->
						</tr>
					</thead>
					
					<tfoot align="center">
						<tr class="BabSiteAdminTitleFontBackground"> 
							<td colspan="{ iNbrColumnHeaders }">
								<input type="submit" name="_onNbRowPerPageChanged" value="{ sDisplay }" />
								<select name="iNbRowsPerPage" onchange="onNbRowPerPageChanged()">
								<!--#in getNextNbRow -->
									<option value="{ iNbRow }" { sNbRowPerPageSelected } >{ sNbRow }</option>
								<!--#endin getNextNbRow -->
								</select>
								{ sResultPerPage }
							</td>
						</tr>
						<tr class="BabLetterlists"> 
							<td colspan="{ iNbrColumnHeaders }" nowrap>
								{ sPagination }<br />{ sStatusLine }
							</td>
						</tr>
					</tfoot>

					<tbody>
						<!--#in getNextRow -->
					<!--#if bIsAltbg -->
						<tr class="BabSiteAdminFontBackground"> 
					<!--#else bIsAltbg -->
						<tr class="BabForumBackground1">
					<!--#endif bIsAltbg -->
						<td>
						<!--#in processActionsExcludeFilter -->
						<!--#endin processActionsExcludeFilter -->
						<!--#in getNextAction -->
						<a href="{ aActionItems[sLink] }" title="{ aActionItems[sText] }" >
							<img src="{ aActionItems[sIcon] }" alt="{ aActionItems[sText] }" border="0" />
						</a>
						<!--#endin getNextAction -->
						<!--#in getNextColumnData -->
							<td>
								<!--#in getNextColumnDataItem -->
								<div class="{ sClassName } { sCostClassName }">	
									{ sColumnData }
								</div>	
								<!--#endin getNextColumnDataItem -->
							</td>
						<!--#endin getNextColumnData -->
							</td>
						</tr>
						<!--#endin getNextRow -->
					</tbody>
					
				<!--#if m_bLastPage -->
					<tbody>
						<!--#in getLastRow -->
					<!--#if bIsAltbg -->
						<tr class="BabSiteAdminFontBackground"> 
					<!--#else bIsAltbg -->
						<tr class="BabForumBackground1">
					<!--#endif bIsAltbg -->
						<td>&nbsp;</td>
						<!--#in getNextColumnData -->
							<td>
								<!--#in getNextColumnDataItem -->
								<div class="{ sClassName } { sCostClassName }">	
									{ sColumnData }
								</div>	
								<!--#endin getNextColumnDataItem -->
							</td>
						<!--#endin getNextColumnData -->
						</tr>
						<!--#endin getLastRow -->
					</tbody>
				<!--#endif m_bLastPage -->

				</table>
			</td>
		</tr>
	</table>
	<script type="text/javascript">
	<!--
		hideOnNbRowPerPageChangedButton();
	//-->
	</script>
</form>
<!--#end taskMultipage -->

<!--#begin orderTaskFields -->
<script type="text/javascript">
//<![CDATA[
function bab_moveSelection(bDirection)
{
	var oSelectedField = document.getElementById('oSelectedField');
	if(null != oSelectedField)
	{
		var iSelectedIndex = oSelectedField.selectedIndex;
		if(iSelectedIndex != -1)
		{
			if(iSelectedIndex == 0 && bDirection == true)
			{
				return;
			}
			
			if(iSelectedIndex == oSelectedField.options.length - 1 && bDirection == false)
			{
				return;
			}
			
			var iIndex = iSelectedIndex + ( bDirection ? - 1 : 1)
			
			if(iIndex < 0)
			{
				iIndex = oSelectedField.length - 1;
			}
			
			if(iIndex >= oSelectedField.length) 
			{
				iIndex = 0;
			}
			
			var oldVal = oSelectedField[iSelectedIndex].value;
			var oldText = oSelectedField[iSelectedIndex].text;
			var oldClass = oSelectedField[iSelectedIndex].className;
			
			oSelectedField[iSelectedIndex].value = oSelectedField[iIndex].value;
			oSelectedField[iSelectedIndex].text = oSelectedField[iIndex].text;
			oSelectedField[iSelectedIndex].className = oSelectedField[iIndex].className;
			
			oSelectedField[iIndex].value = oldVal;
			oSelectedField[iIndex].text = oldText;
			oSelectedField[iIndex].className = oldClass;
			
			oSelectedField.selectedIndex = iIndex;
		}
	}
}


function bab_selectOption(sControlId, sAction)
{
	var bSelect;
	if('All' === sAction)
	{
		bSelect = true;
	}
	else if('None' === sAction)
	{
		bSelect = false;
	}
	else
	{
		return;
	}

	var oControl = document.getElementById(sControlId);
	if(null !== oControl)
	{
		var iLength = oControl.length;
		
//		alert(sControlId + ' iNbChild ==> ' + iLength);
		
		for(var iIndex = 0; iIndex < iLength; ++iIndex)
		{
			oControl.options[iIndex].selected = bSelect;
		}
	}
}

//onclick="bab_selectOption('oSelectedField', 'All')" 

//]]>
</script>



<form method="post" id="orderTaskFields" action="{ babPhpSelf }">
	<input type="hidden" name="tg" value="{ m_datas[tg] }" />
	<input type="hidden" name="idx" value="{ m_datas[idx] }" />
	<input type="hidden" name="action" value="{ m_datas[action] }" />
	<input type="hidden" name="iIdProjectSpace" value="{ m_datas[iIdProjectSpace] }" />
	<input type="hidden" name="iIdProject" value="{ m_datas[iIdProject] }" />
	<input type="hidden" name="sCleanSessVar" value="{ m_datas[sCleanSessVar] }" />

	<table border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground" align="center"> 
				<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="10">
					<tr>
						<td colspan="4" align="left">
							<span class="fieldLegendItem taskFieldLegend">&nbsp</span>{ m_captions[sTaskField] }
							<span class="fieldLegendItem additionalFieldLegend">&nbsp</span>{ m_captions[sAdditionalField] }
						</td>
					</tr>
					<tr>
						<td with="1%">
							<h5>{ m_captions[sSelectableField] }</h5>
							<select id="oSelectableField" name="aSelectableField[]" multiple="multiple" size="20">
								<!--#in getNextSelectableField -->
								<option class="{ m_datas[sClassName] }" value="{ m_datas[sValue] }" >{ m_datas[sLegend] }</option>
								<!--#endin getNextSelectableField -->
							</select>
						</td> 
						<td valign="middle" align="center">
							<p><input class="bab_grabField" type="submit" name="action[sGrabField]" value="{ m_captions[sGrabField] }" /></p>
							<p><input class="bab_dropField" type="submit" name="action[sDropField]" value="{ m_captions[sDropField] }" /></p>
						</td>
						<td with="1%">
							<h5>{ m_captions[sSelectedField] }</h5>
							<select id="oSelectedField" name="aSelectedField[]" multiple="multiple" size="20">
								<!--#in getNextSelectedField -->
								<option class="{ m_datas[sClassName] }" value="{ m_datas[sValue] }" { m_datas[sSelected] }>{ m_datas[sLegend] }</option>
								<!--#endin getNextSelectedField -->
							</select>
						</td> 
						<td valign="middle" align="center">
							<p><input class="bab_upField" type="submit" name="action[sUpField]" value="{ m_captions[sUp] }" /></p>
							<p><input class="bab_downField" type="submit" name="action[sDownField]" value="{ m_captions[sDown] }" /></p>
						</td>
					</tr>
					<tr>
						<td colspan="4" align="center">
							<p><input type="submit" class="bab_saveField" value="{ m_captions[sSave] }" /></p>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form> 
<!--#end orderTaskFields -->


<!--#begin subtree -->
	<!--#in getNextElement -->
	<!--#if t_levelVariation "== 1" --><ul><!--#endif t_levelVariation -->
	<!--#if t_levelVariation "<= -1" --></li></ul><!--#endif t_levelVariation -->
	<!--#if t_levelVariation "== 0" --></li><!--#endif t_levelVariation -->
	<!--#if t_levelVariation ">= -1" -->
		<!--#if t_fetchContentScript --><li id="li{ t_id }" class="bab_ul_tree_not_loaded"><!--#else t_fetchContentScript --><li id="li{ t_id }" class="bab_ul_tree_leaf"><!--#endif t_fetchContentScript -->
		<!--#if t_highlighted --><div class="line" style="background-color: #EEEEEE"><!--#else t_highlighted --><div class="line"><!--#endif t_highlighted -->
			<!--#if t_fetchContentScript -->
			<img class="bullet" src="{ babSkinPath }images/Puces/Space1PxTrans.gif" width="20" height="17" alt="" onclick="if (hasClass(this.parentNode.parentNode, 'bab_ul_tree_not_loaded')) { t_fetchContentScript }" />
			<!--#else t_fetchContentScript -->
			<img class="bullet" src="{ babSkinPath }images/Puces/Space1PxTrans.gif" width="20" height="17" alt="" />
			<!--#endif t_fetchContentScript -->
			<span style="vertical-align: middle; width: 16px; display: -moz-inline-stack; display: inline-block; text-align: center"><!--#if t_nodeIcon --><img class="icon" src="{ t_nodeIcon }" alt="" title="{ t_tooltip }" /><!--#else t_nodeIcon --><img src="{ babSkinPath }images/Puces/Space1PxTrans.gif" alt="" title="{ t_tooltip }" /><!--#endif t_nodeIcon --></span>
			<!--#if t_link -->
			<a href="{ t_link }"><span id="nodeTitle.{ t_id }" class="level{ t_offsetPreviousLevel } { t_type }" title="{ t_tooltip }">{ t_title }</span></a>
			<!--#else t_link -->
			<span id="nodeTitle.{ t_id }" class="level{ t_offsetPreviousLevel } { t_type }" title="{ t_tooltip }">{ t_title }</span>
			<!--#endif t_link -->


			<!--#if t_showRightElements -->
			<span class="right_elements">{ t_info }
				<!--#in getNextCheckBox -->
				<input type="checkbox" name="{ checkbox_name }" onclick="{ checkbox_script }" <!--#if checkbox_checked -->checked="checked"<!--#endif checkbox_checked --> />
				<!--#endin getNextCheckBox -->
				<span class="actions" style="background-color: white">
					<div style="position: relative" class="bab_tm_menu">
						<div id="{ t_id }.button" style="position: absolute display: none; cursor: pointer;">
							<img alt="" style="vertical-align: middle" src="{ babSkinPath }images/taskManager/menu.png" />
						</div>
						<div id="{ t_id }.menu" class="bab_tm_menu bab_tm_opaque bab_tm_divToMoveToMenuContainer" style="margin-right:30px;">
							<div class="bab_tm_frame">
								<div style="margin: 0px;">
									<!--#in getNextAction -->
									<div style="margin: 0px 0pt 0pt;">
										<a href="{ action_url }" title="{ t_tooltip }" class="bab_tm_pushbutton" style="vertical-align: middle">
											<img alt="" style="vertical-align: middle" src="{ action_icon }" />&nbsp;{ action_caption }
										</a>
									</div>
									<!--#endin getNextAction -->
								</div>
							</div>
						</div>
					</div>
					<script type="text/javascript">
						document.getElementById('{ t_id }.button').style.visibility	= 'visible';
						document.getElementById('{ t_id }.menu').style.visibility	= 'hidden';
						document.getElementById('{ t_id }.menu').style.right		= window.isIE6 ? '24px' : '0';
					</script>
				</span>
			</span>
			<!--#endif t_showRightElements -->
		</div>
	<!--#endif t_levelVariation -->
	<!--#endin getNextElement -->
<!--#end subtree -->


<!--#begin treeview -->
<div id="{ t_treeViewId }" class="bab_tree { t_classes } <!--#if t_showToolbar -->bab-show-toolbar<!--#endif t_showToolbar --> BabLoginCadreBackground">
	<div class="tree BabLoginMenuBackground" style="position: relative">
		<script type="text/javascript">document.getElementById("{ t_treeViewId }").getElementsByTagName('DIV')[0].style.display='none'</script>
		{ t_subtree }
	</div>
	<!--#if t_isMultiSelect -->
	<div class="bab_treeToolbar BabSiteAdminTitleFontBackground" style="text-align: center;"><button type="submit" onclick="document.getElementById('{ t_treeViewId }').onSubmitTree();">{ t_submit }</button></div>
	<!--#endif t_isMultiSelect  -->
</div>

<div id="bab_tm_menuContainer">
</div>


<script type="text/javascript">
//<![CDATA[
	document.getElementById("{ t_treeViewId }").getElementsByTagName('DIV')[0].style.display = ''
//]]>
</script>

<script type="text/javascript" src="{ babSkinPath }templates/tree.js"></script>

<script type="text/javascript">
//<![CDATA[
if (!window.bab_Translations) {
	window.bab_Translations = new Array();
}
window.bab_Translations['Expand'] = '{ t_expand }';
window.bab_Translations['Collapse'] = '{ t_collapse }';

var treeview = document.getElementById("{ t_treeViewId }");

treeview.onElementClick = function(element)
{
	try {
		var returnParameters = {
			'type': element.className.split(' ')[1],
			'id': element.parentNode.parentNode.id.split('{ t_id_separator }')[1],
			'content': element.firstChild.nodeValue
		};
		window.opener.bab_dialog._return(returnParameters);
		window.close();
	} catch(e) {};
}

treeview.onSubmitTree = function()
{
	if (!window.opener) {
		window.close();
		return;
	}
	try {
		var returnParameters = new Array();
		var retstr = '';
		var inputs = this.getElementsByTagName('INPUT');
		for (i = 0; i < inputs.length; i++) {
			input = inputs[i];
			if (input.type == 'checkbox' && input.checked) {
				var element;
				for (j = 0; j < input.parentNode.parentNode.childNodes.length; j++) {
					e = input.parentNode.parentNode.childNodes[j];
					if (e.nodeName && (e.nodeName == 'SPAN' || e.nodeName == 'A') && e.className) {
						element = e;
						break;
					}
				}

				var returnParameter = {
					'type': element.className.split(' ')[1],
					'id': input.parentNode.parentNode.parentNode.id.split('{ t_id_separator }')[1],
					'content': element.firstChild.nodeValue
				}
				returnParameters.push(returnParameter);
				returnParameters['param'] = returnParameters;
				returnParameters['callback'] = 'EditorOnInsertFiles';
			}
		}
		window.opener.bab_dialog && window.opener.bab_dialog._return(returnParameters);
		window.close();
	} catch (err) {
		for (name in err) {
			window.console && window.console.debug(name + ': ' + err[name]);
		}
	}
}

var tree = bab_initTree(document.getElementById("{ t_treeViewId }"));

if (tree) {
	<!--#if t_memorizeOpenNodes -->
	tree.memorizeOpenNodes = true;
	<!--#endif t_memorizeOpenNodes -->
	tree.loadState();
}
//]]>
</script>
<!--#end treeview -->

<!--#begin treeview_css -->
<style type="text/css">
	@import url('{ babInstallPath }styles/tree.css');
</style>
<!--#end treeview_css -->


<!--#begin treeview_scripts -->
<script type="text/javascript">
//<![CDATA[
function bab_stopEvent(ev)
{
	ev || (ev = window.event);
	if ($.browser.msie) {
		ev.cancelBubble = true;
		ev.returnValue = false;
	} else {
		ev.preventDefault();
		ev.stopPropagation();
	}
	return false;
};

function bab_addEvent(el, evname, func)
{
	if (el.attachEvent) { // IE
		el.attachEvent("on" + evname, func);
	} else if (el.addEventListener) { // Gecko / W3C
		el.addEventListener(evname, func, true);
	} else {
		el["on" + evname] = func;
	}
};


// FIXME: the following 2 functions totally suck, are useless and should be replaced immediately.
function bab_getElement(ev)
{
	var f = $.browser.msie ? window.event.srcElement : ev.currentTarget;
	while (f.nodeType != 1 || /^div$/i.test(f.tagName))
		f = f.parentNode;
	return f;
};

function bab_getTargetElement(ev)
{
	var f = $.browser.msie ? window.event.srcElement : ev.target;
	while (f.nodeType != 1)
		f = f.parentNode;
	return f;
};

// This gets called when the user presses a mouse button anywhere in the
// document, if the calendar is shown.  If the click was outside the open
// calendar this function closes it.
var bab_checkMenu = function(ev)
{
	var menu = window.bab_currentMenu;
	if (!menu) {
		return false;
	}
	var el = $.browser.msie ? bab_getElement(ev) : bab_getTargetElement(ev);
	for (; el != null && el != menu; el = el.parentNode);
	if (el == null) {
		$(menu).hide();
		window.bab_currentMenu = null;
		return bab_stopEvent(ev);
	}
	return false;
};


function bab_toggleMenu(button,div)
{
	var parentTreeDiv = $(div).parents(".tree")[0];

	var buttonX = 0;
	var buttonY = 0;
	for (var element = button; element != parentTreeDiv && element != null; element = element.offsetParent) {
		buttonX += element.offsetLeft;
		buttonY += element.offsetTop;
	}
	window.bab_currentMenu = div;
	$(parentTreeDiv).append(div);
	div.style.top = (buttonY + 10) + "px";
	if ($.browser.msie) {
		var nbUls = $(button).parents("ul").length + 1;
		div.style.left = (buttonX - 23 * nbUls) + "px";
	} else {
		div.style.left = buttonX + "px";
	}
	if ($(div).is(":hidden")) {
		$(div).fadeIn('normal');
		window.bab_currentMenu = div;
		bab_addEvent(document, "click", bab_checkMenu);
	}
}

function bab_tm_toggleMenu(oEvent)
{
	var sId		= $(this).id.substring(0, $(this).id.indexOf('.button'));
	var oLI		= $('nodeTitle.' + sId);
	var oDiv	= $(sId + '.menu');
	
	if(window.bab_tm_currentMenu && window.bab_tm_currentMenu != oDiv) 
	{
		window.bab_tm_currentMenu.style.visibility	= 'hidden';
	}
	
	if(window.bab_tm_nodeTiltle && window.bab_tm_nodeTiltle != oLI) 
	{
		window.bab_tm_nodeTiltle.style.color = '#000000';
	}
	
	window.bab_tm_nodeTiltle	= oLI;
	window.bab_tm_currentMenu	= oDiv;

	if('hidden' == $(oDiv).style.visibility) 
	{
		var iWidth	= parseInt($(oDiv).style.width);
		var iTop	= Event.pointerY(oEvent);
		var iLeft	= Event.pointerX(oEvent);

		var sLeft	= (iLeft - iWidth - 10) + 'px';
		var sTop	= (iTop - 10) + 'px';
		
		$(oDiv).setStyle({ left: sLeft, top: sTop });
		$(oLI).setStyle({ color: 'red'});
		$(oDiv).setStyle({ visibility: 'visible' });
	}
	else
	{
		$(oDiv).setStyle({ visibility: 'hidden'});
		$(oLI).setStyle({ color: '#000000'});
	}
}

document.observe("dom:loaded", function bab_tm_moveMenu() {
	$$('div.bab_tm_divToMoveToMenuContainer').each(function(oDiv) {

		$('bab_tm_menuContainer').appendChild(oDiv);
		oDiv.style.position = 'absolute';

		{	
			oDiv.style.visibility	= 'visible';
			var iWidth				= parseInt(oDiv.offsetWidth);
			oDiv.style.visibility	= 'hidden';		

			$(oDiv).setStyle({ left: '-1000px', top: '-1000px', width: iWidth + 'px'});
	
			var sId = $(oDiv).id.substring(0, $(oDiv).id.indexOf('.menu'));
			$(sId + '.button').observe('click', bab_tm_toggleMenu);
		}

		$(document.body).appendChild($('bab_tm_menuContainer'));
	});
});
//]]>
</script>
<!--#end treeview_scripts -->

